diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-29 14:17:47 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-29 14:17:47 -0800 |
commit | b19b7d000887209f9d8dc1dc6aa468a0497a7391 (patch) | |
tree | 68d1eb6c136df20c2800f1dddb4e2c1ed5d75a42 /spec/functional/knife | |
parent | b5c9c6afdfd83fe3f1bf4c991daffeff94b49750 (diff) | |
download | chef-b19b7d000887209f9d8dc1dc6aa468a0497a7391.tar.gz |
s/stub!/stub/g
fix deprecation warnings
Diffstat (limited to 'spec/functional/knife')
-rw-r--r-- | spec/functional/knife/cookbook_delete_spec.rb | 18 | ||||
-rw-r--r-- | spec/functional/knife/ssh_spec.rb | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/spec/functional/knife/cookbook_delete_spec.rb b/spec/functional/knife/cookbook_delete_spec.rb index 2d52fb91a3..ee620bf165 100644 --- a/spec/functional/knife/cookbook_delete_spec.rb +++ b/spec/functional/knife/cookbook_delete_spec.rb @@ -51,7 +51,7 @@ describe Chef::Knife::CookbookDelete do end it "logs an error and exits" do - @knife.ui.stub!(:stderr).and_return(@log_output) + @knife.ui.stub(:stderr).and_return(@log_output) lambda {@knife.run}.should raise_error(SystemExit) @log_output.string.should match(/Cannot find a cookbook named no-such-cookbook to delete/) end @@ -67,8 +67,8 @@ describe Chef::Knife::CookbookDelete do it "asks for confirmation, then deletes the cookbook" do stdin, stdout = StringIO.new("y\n"), StringIO.new - @knife.ui.stub!(:stdin).and_return(stdin) - @knife.ui.stub!(:stdout).and_return(stdout) + @knife.ui.stub(:stdin).and_return(stdin) + @knife.ui.stub(:stdout).and_return(stdout) cb100_deleted = false @api.delete("/cookbooks/obsolete-cookbook/1.0.0", 200) { cb100_deleted = true; "[\"true\"]" } @@ -83,8 +83,8 @@ describe Chef::Knife::CookbookDelete do @knife.config[:purge] = true stdin, stdout = StringIO.new("y\ny\n"), StringIO.new - @knife.ui.stub!(:stdin).and_return(stdin) - @knife.ui.stub!(:stdout).and_return(stdout) + @knife.ui.stub(:stdin).and_return(stdin) + @knife.ui.stub(:stdout).and_return(stdout) cb100_deleted = false @api.delete("/cookbooks/obsolete-cookbook/1.0.0?purge=true", 200) { cb100_deleted = true; "[\"true\"]" } @@ -126,8 +126,8 @@ describe Chef::Knife::CookbookDelete do cb100_deleted = cb110_deleted = cb120_deleted = nil @api.delete("/cookbooks/obsolete-cookbook/1.0.0", 200) { cb100_deleted = true; "[\"true\"]" } stdin, stdout = StringIO.new, StringIO.new - @knife.ui.stub!(:stdin).and_return(stdin) - @knife.ui.stub!(:stdout).and_return(stdout) + @knife.ui.stub(:stdin).and_return(stdin) + @knife.ui.stub(:stdout).and_return(stdout) stdin << "1\n" stdin.rewind @knife.run @@ -142,8 +142,8 @@ describe Chef::Knife::CookbookDelete do @api.delete("/cookbooks/obsolete-cookbook/1.2.0", 200) { cb120_deleted = true; "[\"true\"]" } stdin, stdout = StringIO.new("4\n"), StringIO.new - @knife.ui.stub!(:stdin).and_return(stdin) - @knife.ui.stub!(:stdout).and_return(stdout) + @knife.ui.stub(:stdin).and_return(stdin) + @knife.ui.stub(:stdout).and_return(stdout) @knife.run diff --git a/spec/functional/knife/ssh_spec.rb b/spec/functional/knife/ssh_spec.rb index fd8cfe0f7e..40d71859c7 100644 --- a/spec/functional/knife/ssh_spec.rb +++ b/spec/functional/knife/ssh_spec.rb @@ -252,7 +252,7 @@ describe Chef::Knife::Ssh do # if available, but #merge_configs (which is called by #configure_chef) is # necessary to have default options merged in. @knife.merge_configs - @knife.stub!(:ssh_command).and_return { 0 } + @knife.stub(:ssh_command).and_return { 0 } @api = TinyServer::API.instance @api.clear |