diff options
Diffstat (limited to 'spec/unit/knife/cookbook_site_unshare_spec.rb')
-rw-r--r-- | spec/unit/knife/cookbook_site_unshare_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/knife/cookbook_site_unshare_spec.rb b/spec/unit/knife/cookbook_site_unshare_spec.rb index 8e4358226d..7797fdb3f8 100644 --- a/spec/unit/knife/cookbook_site_unshare_spec.rb +++ b/spec/unit/knife/cookbook_site_unshare_spec.rb @@ -55,14 +55,14 @@ describe Chef::Knife::CookbookSiteUnshare do end it "should log an error and exit when forbidden" do - exception = double('403 "Forbidden"', :code => "403") + exception = double('403 "Forbidden"', code: "403") allow(@rest).to receive(:delete).and_raise(Net::HTTPServerException.new('403 "Forbidden"', exception)) expect(@knife.ui).to receive(:error) expect { @knife.run }.to raise_error(SystemExit) end it "should re-raise any non-forbidden errors on delete" do - exception = double('500 "Application Error"', :code => "500") + exception = double('500 "Application Error"', code: "500") allow(@rest).to receive(:delete).and_raise(Net::HTTPServerException.new('500 "Application Error"', exception)) expect { @knife.run }.to raise_error(Net::HTTPServerException) end |