diff options
author | James Turnbull <james@lovedthanlost.net> | 2009-07-23 14:45:29 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-07-23 15:27:55 +1000 |
commit | ef5c4aeb1f58bd37e8b4ea0fa17fbdbc2fbf7677 (patch) | |
tree | ec16fd7b9f3c8f98a82497f28725738e85b56bf4 | |
parent | 0c18013cb6bf9faff21bd049410e2baf1ef8aa90 (diff) | |
download | puppet-ef5c4aeb1f58bd37e8b4ea0fa17fbdbc2fbf7677.tar.gz puppet-ef5c4aeb1f58bd37e8b4ea0fa17fbdbc2fbf7677.tar.xz puppet-ef5c4aeb1f58bd37e8b4ea0fa17fbdbc2fbf7677.zip |
Fixed #2436 - Changed ralsh to use Puppet::Type.new and avoid deprecation notice
-rw-r--r-- | lib/puppet/application/ralsh.rb | 2 | ||||
-rw-r--r-- | spec/unit/application/ralsh.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/application/ralsh.rb b/lib/puppet/application/ralsh.rb index d15d3e617..8d8d306b8 100644 --- a/lib/puppet/application/ralsh.rb +++ b/lib/puppet/application/ralsh.rb @@ -104,7 +104,7 @@ Puppet::Application.new(:ralsh) do transbucket.sort { |a,b| a.name <=> b.name }.collect(&format) else if name - obj = typeobj.create(:name => name, :check => properties) + obj = typeobj.new(:name => name, :check => properties) vals = obj.retrieve unless params.empty? diff --git a/spec/unit/application/ralsh.rb b/spec/unit/application/ralsh.rb index 289748a10..4372dac37 100644 --- a/spec/unit/application/ralsh.rb +++ b/spec/unit/application/ralsh.rb @@ -206,12 +206,12 @@ describe "ralsh" do ARGV.stubs(:shift).returns("type").then.returns('name') ARGV.stubs(:length).returns(1).then.returns(1).then.returns(0) @object = stub_everything 'object', :to_trans => stub_everything('transportable') - @type.stubs(:create).returns(@object) + @type.stubs(:new).returns(@object) @object.stubs(:retrieve) end - it "should retrieve a specific instace" do - @type.expects(:create).returns(@object) + it "should retrieve a specific instance" do + @type.expects(:new).returns(@object) @object.expects(:retrieve) @ralsh.main |