summaryrefslogtreecommitdiff
path: root/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-31 09:57:05 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-31 09:57:05 -0700
commit14b9553818265ecc35c037adfe479320e3a70e34 (patch)
treeec8f36c6f929f0c0b56f062484a280d6e645d61e /spec/unit/chef_fs/file_system/operation_failed_error_spec.rb
parentf051b6e7912086edc03747f4b1c0285bfb6597f5 (diff)
downloadchef-lcg/weirich-semantic-block.tar.gz
For Discussion: Weirich Semantic Block stylelcg/weirich-semantic-block
Style/BlockDelimiters: Enabled: true EnforcedStyle: semantic See, eg: https://github.com/rubocop-hq/ruby-style-guide/issues/162 http://www.virtuouscode.com/2011/07/26/the-procedurefunction-block-convention-in-ruby/ Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
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.rb8
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