diff options
Diffstat (limited to 'spec/unit/chef_fs/file_system/operation_failed_error_spec.rb')
-rw-r--r-- | spec/unit/chef_fs/file_system/operation_failed_error_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb b/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb index 661994337b..2bda2b75c9 100644 --- a/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +++ b/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb @@ -30,17 +30,17 @@ describe Chef::ChefFS::FileSystem::OperationFailedError do allow(@response).to receive(:code).and_return("400") allow(@response).to receive(:body).and_return(response_body) exception = Net::HTTPClientException.new("(exception) unauthorized", @response) - expect do + expect { raise Chef::ChefFS::FileSystem::OperationFailedError.new(:write, self, exception), error_message - end.to raise_error(Chef::ChefFS::FileSystem::OperationFailedError, "#{error_message} cause: #{response_body}") + }.to raise_error(Chef::ChefFS::FileSystem::OperationFailedError, "#{error_message} cause: #{response_body}") end end context "does not have a cause attribute" do it "does not include error cause" do - expect do + expect { raise Chef::ChefFS::FileSystem::OperationFailedError.new(:write, self), error_message - end.to raise_error(Chef::ChefFS::FileSystem::OperationFailedError, error_message) + }.to raise_error(Chef::ChefFS::FileSystem::OperationFailedError, error_message) end end end |