diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-17 12:15:26 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-17 13:25:02 -0700 |
commit | a0c32511bc6634538374ca4b433032b8acd05f96 (patch) | |
tree | 15c7cfbd0d773488ab814e7c24f0c58505c9134b /spec/unit/chef_fs | |
parent | 3d0379a2ad531a0b3db5ed2827bf30ef07b26100 (diff) | |
download | chef-a0c32511bc6634538374ca4b433032b8acd05f96.tar.gz |
fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgrade
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/chef_fs')
-rw-r--r-- | spec/unit/chef_fs/data_handler/group_handler_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/chef_fs/diff_spec.rb | 8 | ||||
-rw-r--r-- | spec/unit/chef_fs/file_system/operation_failed_error_spec.rb | 8 | ||||
-rw-r--r-- | spec/unit/chef_fs/file_system_spec.rb | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/spec/unit/chef_fs/data_handler/group_handler_spec.rb b/spec/unit/chef_fs/data_handler/group_handler_spec.rb index 849bc84f92..ac0252162f 100644 --- a/spec/unit/chef_fs/data_handler/group_handler_spec.rb +++ b/spec/unit/chef_fs/data_handler/group_handler_spec.rb @@ -29,7 +29,7 @@ class TestEntry < Mash end describe Chef::ChefFS::DataHandler::GroupDataHandler do - describe '#normalize_for_post' do + describe "#normalize_for_post" do let(:entry) do TestEntry.new("workers.json", "hive") end diff --git a/spec/unit/chef_fs/diff_spec.rb b/spec/unit/chef_fs/diff_spec.rb index c1c9050101..d946fcb9e7 100644 --- a/spec/unit/chef_fs/diff_spec.rb +++ b/spec/unit/chef_fs/diff_spec.rb @@ -32,7 +32,7 @@ describe "diff", :uses_diff => true do include FileSystemSupport context "with two filesystems with all types of difference" do - let(:a) { + let(:a) do memory_fs("a", { :both_dirs => { :sub_both_dirs => { :subsub => nil }, @@ -58,8 +58,8 @@ describe "diff", :uses_diff => true do :dir_in_a_file_in_b => {}, :file_in_a_dir_in_b => nil, }, /cannot_be_in_a/) - } - let(:b) { + end + let(:b) do memory_fs("b", { :both_dirs => { :sub_both_dirs => { :subsub => nil }, @@ -85,7 +85,7 @@ describe "diff", :uses_diff => true do :dir_in_a_file_in_b => nil, :file_in_a_dir_in_b => {}, }, /cannot_be_in_b/) - } + end it "Chef::ChefFS::CommandLine.diff_print(/)" do results = [] Chef::ChefFS::CommandLine.diff_print(pattern("/"), a, b, nil, nil) do |diff| 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 b0b5a547cd..7f3eb6efe2 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::HTTPServerException.new("(exception) unauthorized", @response) - expect { + expect do raise Chef::ChefFS::FileSystem::OperationFailedError.new(:write, self, exception), error_message - }.to raise_error(Chef::ChefFS::FileSystem::OperationFailedError, "#{error_message} cause: #{response_body}") + end.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 { + expect do raise Chef::ChefFS::FileSystem::OperationFailedError.new(:write, self), error_message - }.to raise_error(Chef::ChefFS::FileSystem::OperationFailedError, error_message) + end.to raise_error(Chef::ChefFS::FileSystem::OperationFailedError, error_message) end end end diff --git a/spec/unit/chef_fs/file_system_spec.rb b/spec/unit/chef_fs/file_system_spec.rb index 429e039dda..5c74729557 100644 --- a/spec/unit/chef_fs/file_system_spec.rb +++ b/spec/unit/chef_fs/file_system_spec.rb @@ -55,7 +55,7 @@ describe Chef::ChefFS::FileSystem do end context "with a populated filesystem" do - let(:fs) { + let(:fs) do memory_fs("", { :a => { :aa => { @@ -69,7 +69,7 @@ describe Chef::ChefFS::FileSystem do :x => "", :y => {}, }) - } + end context "list" do it "/**" do list_should_yield_paths(fs, "/**", "/", "/a", "/x", "/y", "/a/aa", "/a/aa/c", "/a/aa/zz", "/a/ab", "/a/ab/c") |