diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-19 09:28:33 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-19 09:28:33 -0800 |
commit | 92bec4bb96d857f027068fc56af46c76c484fd50 (patch) | |
tree | 2cffea3fc9466d0c5e2baa7cc7630abb0ed7aecb /spec/unit | |
parent | 6077b99f6ad1bc9a082f575f3818e69f05d8c8dc (diff) | |
download | chef-92bec4bb96d857f027068fc56af46c76c484fd50.tar.gz |
flip multiline function arguments aroundlcg/rubocop-0.37.2
no enforced trailing comma on arguments...
Diffstat (limited to 'spec/unit')
51 files changed, 225 insertions, 225 deletions
diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb index 9383e8e856..ff6f460c13 100644 --- a/spec/unit/application/client_spec.rb +++ b/spec/unit/application/client_spec.rb @@ -85,7 +85,7 @@ describe Chef::Application::Client, "reconfigure" do "Unforked chef-client interval runs are disabled in Chef 12. Configuration settings: interval = 600 seconds -Enable chef-client interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options.", +Enable chef-client interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options." ) app.reconfigure end diff --git a/spec/unit/application/solo_spec.rb b/spec/unit/application/solo_spec.rb index af504b621c..4361a2cd33 100644 --- a/spec/unit/application/solo_spec.rb +++ b/spec/unit/application/solo_spec.rb @@ -70,7 +70,7 @@ describe Chef::Application::Solo do "Unforked chef-client interval runs are disabled in Chef 12. Configuration settings: interval = 600 seconds -Enable chef-client interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options.", +Enable chef-client interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options." ) app.reconfigure end diff --git a/spec/unit/chef_fs/config_spec.rb b/spec/unit/chef_fs/config_spec.rb index 2f65b6db94..5fc5ad57ac 100644 --- a/spec/unit/chef_fs/config_spec.rb +++ b/spec/unit/chef_fs/config_spec.rb @@ -68,7 +68,7 @@ describe Chef::ChefFS::Config do role_path: "/base_path/roles", user_path: "/base_path/users", policy_path: "/base_path/policies", - },) + }) end let(:chef_fs_config) { Chef::ChefFS::Config.new(chef_config, Dir.pwd) } diff --git a/spec/unit/chef_fs/file_system_spec.rb b/spec/unit/chef_fs/file_system_spec.rb index 71befc426c..429e039dda 100644 --- a/spec/unit/chef_fs/file_system_spec.rb +++ b/spec/unit/chef_fs/file_system_spec.rb @@ -68,7 +68,7 @@ describe Chef::ChefFS::FileSystem do }, :x => "", :y => {}, - },) + }) } context "list" do it "/**" do diff --git a/spec/unit/cookbook/metadata_spec.rb b/spec/unit/cookbook/metadata_spec.rb index 976ab61e38..0107667fcd 100644 --- a/spec/unit/cookbook/metadata_spec.rb +++ b/spec/unit/cookbook/metadata_spec.rb @@ -311,7 +311,7 @@ describe Chef::Cookbook::Metadata do it "strips out self-dependencies", :chef_lt_13_only do metadata.name("foo") expect(Chef::Log).to receive(:warn).with( - "Ignoring self-dependency in cookbook foo, please remove it (in the future this will be fatal).", + "Ignoring self-dependency in cookbook foo, please remove it (in the future this will be fatal)." ) metadata.depends("foo") expect(metadata.dependencies).to eql({}) diff --git a/spec/unit/key_spec.rb b/spec/unit/key_spec.rb index ef8d39bb0d..4af506d227 100644 --- a/spec/unit/key_spec.rb +++ b/spec/unit/key_spec.rb @@ -532,7 +532,7 @@ EOS allow(rest).to receive(:put).with(url, key.to_hash).and_return({ "key" => "key_name", "public_key" => public_key_string, - },) + }) end diff --git a/spec/unit/knife/core/node_editor_spec.rb b/spec/unit/knife/core/node_editor_spec.rb index 6665616027..19af419632 100644 --- a/spec/unit/knife/core/node_editor_spec.rb +++ b/spec/unit/knife/core/node_editor_spec.rb @@ -91,7 +91,7 @@ describe Chef::Knife::NodeEditor do "normal" => { "alpha" => { "bravo" => "hotel2" }, "tags" => [ "xyz" ] }, "policy_name" => "mypolicy", "policy_group" => "prod", - "run_list" => %w{role[drama] recipe[mystery]}, + "run_list" => %w{role[drama] recipe[mystery]} ) end @@ -123,7 +123,7 @@ describe Chef::Knife::NodeEditor do "override" => { "alpha" => { "bravo" => "foxtrot2", "delta" => "golf2" } }, "policy_name" => "mypolicy", "policy_group" => "prod", - "run_list" => %w{role[drama] recipe[mystery]}, + "run_list" => %w{role[drama] recipe[mystery]} ) end @@ -159,7 +159,7 @@ describe Chef::Knife::NodeEditor do "override" => { "alpha" => { "bravo" => "foxtrot2", "delta" => "golf2" } }, "policy_name" => "mypolicy", "policy_group" => "prod", - "run_list" => %w{role[drama] recipe[mystery]}, + "run_list" => %w{role[drama] recipe[mystery]} ) end diff --git a/spec/unit/mixin/params_validate_spec.rb b/spec/unit/mixin/params_validate_spec.rb index 38e3ba742e..dcee123982 100644 --- a/spec/unit/mixin/params_validate_spec.rb +++ b/spec/unit/mixin/params_validate_spec.rb @@ -63,7 +63,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :kind_of => String, }, - }, + } ) }.not_to raise_error @@ -74,7 +74,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :kind_of => Array, }, - }, + } ) }.to raise_error(ArgumentError) end @@ -87,7 +87,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :required => true, }, - }, + } ) }.not_to raise_error @@ -98,7 +98,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :required => true, }, - }, + } ) }.to raise_error(ArgumentError) @@ -109,7 +109,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :required => false, }, - }, + } ) }.not_to raise_error end @@ -122,7 +122,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :respond_to => "validate", }, - }, + } ) }.not_to raise_error @@ -133,7 +133,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :respond_to => "monkey", }, - }, + } ) }.to raise_error(ArgumentError) end @@ -146,7 +146,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :respond_to => %w{validate music}, }, - }, + } ) }.not_to raise_error @@ -157,7 +157,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :respond_to => %w{monkey validate}, }, - }, + } ) }.to raise_error(ArgumentError) end @@ -168,7 +168,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :default => "is the loneliest number", }, - },) + }) expect(arguments[:one]).to eq("is the loneliest number") end @@ -180,7 +180,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :regex => /^is good$/, }, - }, + } ) }.not_to raise_error @@ -191,7 +191,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :regex => /^is bad$/, }, - }, + } ) }.to raise_error(ArgumentError) end @@ -208,7 +208,7 @@ describe Chef::Mixin::ParamsValidate do }, }, }, - }, + } ) }.not_to raise_error @@ -223,7 +223,7 @@ describe Chef::Mixin::ParamsValidate do }, }, }, - }, + } ) }.to raise_error(ArgumentError) end @@ -250,7 +250,7 @@ describe Chef::Mixin::ParamsValidate do :required => false, }, :three => { :default => "neato mosquito" }, - }, + } ) }.not_to raise_error expect(args[:three]).to eq("neato mosquito") @@ -274,7 +274,7 @@ describe Chef::Mixin::ParamsValidate do :required => false, }, :three => { :default => "neato mosquito" }, - }, + } ) }.to raise_error(ArgumentError) end @@ -286,7 +286,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :busted => "check", }, - }, + } ) }.to raise_error(ArgumentError) end @@ -305,7 +305,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :kind_of => [ String, Array ], }, - }, + } ) }.not_to raise_error expect { @@ -315,7 +315,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :kind_of => [ String, Array ], }, - }, + } ) }.not_to raise_error expect { @@ -325,7 +325,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :kind_of => [ String, Array ], }, - }, + } ) }.to raise_error(ArgumentError) end diff --git a/spec/unit/mixin/powershell_out_spec.rb b/spec/unit/mixin/powershell_out_spec.rb index b586be7fdc..eae5b033f1 100644 --- a/spec/unit/mixin/powershell_out_spec.rb +++ b/spec/unit/mixin/powershell_out_spec.rb @@ -31,7 +31,7 @@ describe Chef::Mixin::PowershellOut do ret = double("Mixlib::ShellOut") expect(object).to receive(:shell_out).with( "powershell.exe #{flags} -Command \"Get-Process\"", - {}, + {} ).and_return(ret) expect(object.powershell_out("Get-Process")).to eql(ret) end @@ -40,7 +40,7 @@ describe Chef::Mixin::PowershellOut do ret = double("Mixlib::ShellOut") expect(object).to receive(:shell_out).with( "powershell.exe #{flags} -Command \"Get-Process\"", - timeout: 600, + timeout: 600 ).and_return(ret) expect(object.powershell_out("Get-Process", timeout: 600)).to eql(ret) end @@ -51,7 +51,7 @@ describe Chef::Mixin::PowershellOut do mixlib_shellout = double("Mixlib::ShellOut") expect(object).to receive(:shell_out).with( "powershell.exe #{flags} -Command \"Get-Process\"", - {}, + {} ).and_return(mixlib_shellout) expect(mixlib_shellout).to receive(:error!) expect(object.powershell_out!("Get-Process")).to eql(mixlib_shellout) @@ -61,7 +61,7 @@ describe Chef::Mixin::PowershellOut do mixlib_shellout = double("Mixlib::ShellOut") expect(object).to receive(:shell_out).with( "powershell.exe #{flags} -Command \"Get-Process\"", - timeout: 600, + timeout: 600 ).and_return(mixlib_shellout) expect(mixlib_shellout).to receive(:error!) expect(object.powershell_out!("Get-Process", timeout: 600)).to eql(mixlib_shellout) diff --git a/spec/unit/mixin/shell_out_spec.rb b/spec/unit/mixin/shell_out_spec.rb index e2e282da24..e9fabfd0a7 100644 --- a/spec/unit/mixin/shell_out_spec.rb +++ b/spec/unit/mixin/shell_out_spec.rb @@ -144,7 +144,7 @@ describe Chef::Mixin::ShellOut do "LANG" => Chef::Config[:internal_locale], "LANGUAGE" => Chef::Config[:internal_locale], }, - },).and_return(true) + }).and_return(true) shell_out_obj.shell_out(cmd, options) end @@ -157,7 +157,7 @@ describe Chef::Mixin::ShellOut do "LANG" => Chef::Config[:internal_locale], "LANGUAGE" => Chef::Config[:internal_locale], }, - },).and_return(true) + }).and_return(true) shell_out_obj.shell_out(cmd, options) expect(options[:environment].has_key?("LC_ALL")).to be false end @@ -185,7 +185,7 @@ describe Chef::Mixin::ShellOut do "LANG" => Chef::Config[:internal_locale], "LANGUAGE" => Chef::Config[:internal_locale], }, - },).and_return(true) + }).and_return(true) shell_out_obj.shell_out(cmd, options) end @@ -198,7 +198,7 @@ describe Chef::Mixin::ShellOut do "LANG" => Chef::Config[:internal_locale], "LANGUAGE" => Chef::Config[:internal_locale], }, - },).and_return(true) + }).and_return(true) shell_out_obj.shell_out(cmd, options) expect(options[:env].has_key?("LC_ALL")).to be false end @@ -214,7 +214,7 @@ describe Chef::Mixin::ShellOut do "LANG" => Chef::Config[:internal_locale], "LANGUAGE" => Chef::Config[:internal_locale], }, - },).and_return(true) + }).and_return(true) shell_out_obj.shell_out(cmd, options) end end @@ -228,7 +228,7 @@ describe Chef::Mixin::ShellOut do "LANG" => Chef::Config[:internal_locale], "LANGUAGE" => Chef::Config[:internal_locale], }, - },).and_return(true) + }).and_return(true) shell_out_obj.shell_out(cmd) end end diff --git a/spec/unit/node/attribute_spec.rb b/spec/unit/node/attribute_spec.rb index 024599bcee..f28c2598e3 100644 --- a/spec/unit/node/attribute_spec.rb +++ b/spec/unit/node/attribute_spec.rb @@ -558,7 +558,7 @@ describe Chef::Node::Attribute do "one" => { "six" => "seven" }, "snack" => "cookies", }, - {}, + {} ) end @@ -606,7 +606,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) end @@ -644,7 +644,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) end @@ -680,7 +680,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) end @@ -716,7 +716,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) end @@ -760,7 +760,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) @empty = Chef::Node::Attribute.new({}, {}, {}, {}) end @@ -794,7 +794,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) end @@ -851,7 +851,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) end @@ -896,7 +896,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) end @@ -937,7 +937,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) end @@ -973,7 +973,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) end @@ -1003,7 +1003,7 @@ describe Chef::Node::Attribute do %w{one six}, %w{snack cookies}, ["snakes", "on a plane"], - ], + ] ) end end @@ -1023,7 +1023,7 @@ describe Chef::Node::Attribute do "one" => "six", "snack" => "cookies", }, - {}, + {} ) @empty = Chef::Node::Attribute.new({}, {}, {}, {}) diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb index afb491f13a..29f386aa7d 100644 --- a/spec/unit/node_spec.rb +++ b/spec/unit/node_spec.rb @@ -615,7 +615,7 @@ describe Chef::Node do expect( node["mysql"]["server"] ).to eql({ "data_dir" => "/my_raid_volume/lib/mysql", - },) + }) end it "removes all values from the precedence level when setting" do @@ -631,7 +631,7 @@ describe Chef::Node do expect( node["mysql"]["server"]["data_dir"] ).to eql("/my_raid_volume/lib/mysql") expect( node["mysql"]["server"] ).to eql({ "data_dir" => "/my_raid_volume/lib/mysql", - },) + }) end it "higher precedence levels are not removed" do @@ -649,7 +649,7 @@ describe Chef::Node do expect( node["mysql"]["server"] ).to eql({ "service_name" => "fancypants-sql", "data_dir" => "/my_raid_volume/lib/mysql", - },) + }) end it "will autovivify" do @@ -674,7 +674,7 @@ describe Chef::Node do expect( node["mysql"]["server"] ).to eql({ "service_name" => "fancypants-sql", "data_dir" => "/my_raid_volume/lib/mysql", - },) + }) end it "when overwriting a non-hash/array" do @@ -693,7 +693,7 @@ describe Chef::Node do } expect( node["mysql"]["server"] ).to eql({ "data_dir" => "/my_raid_volume/lib/mysql", - },) + }) end end diff --git a/spec/unit/platform_spec.rb b/spec/unit/platform_spec.rb index 264cadee81..0559229d62 100644 --- a/spec/unit/platform_spec.rb +++ b/spec/unit/platform_spec.rb @@ -183,18 +183,18 @@ describe Chef::Platform do :platform => :darwin, :version => "9.2.2", :resource => :file, - :provider => "masterful", + :provider => "masterful" ) expect(Chef::Platform.platforms[:darwin]["9.2.2"][:file]).to eql("masterful") Chef::Platform.set( :platform => :darwin, :resource => :file, - :provider => "masterful", + :provider => "masterful" ) expect(Chef::Platform.platforms[:darwin][:default][:file]).to eql("masterful") Chef::Platform.set( :resource => :file, - :provider => "masterful", + :provider => "masterful" ) expect(Chef::Platform.platforms[:default][:file]).to eql("masterful") @@ -202,13 +202,13 @@ describe Chef::Platform do :platform => :hero, :version => "9.2.2", :resource => :file, - :provider => "masterful", + :provider => "masterful" ) expect(Chef::Platform.platforms[:hero]["9.2.2"][:file]).to eql("masterful") Chef::Platform.set( :resource => :file, - :provider => "masterful", + :provider => "masterful" ) expect(Chef::Platform.platforms[:default][:file]).to eql("masterful") @@ -216,7 +216,7 @@ describe Chef::Platform do Chef::Platform.set( :resource => :file, - :provider => "masterful", + :provider => "masterful" ) expect(Chef::Platform.platforms[:default][:file]).to eql("masterful") @@ -230,7 +230,7 @@ describe Chef::Platform do Chef::Platform.set( :resource => :file, :platform => :default, - :provider => "new school", + :provider => "new school" ) expect(Chef::Platform.platforms[:default][:file]).to eql("new school") expect(Chef::Platform.platforms[:default][:cat]).to eql("nice") diff --git a/spec/unit/provider/group_spec.rb b/spec/unit/provider/group_spec.rb index f056114d89..1d354ea32e 100644 --- a/spec/unit/provider/group_spec.rb +++ b/spec/unit/provider/group_spec.rb @@ -39,7 +39,7 @@ describe Chef::Provider::User do @pw_group = double("Struct::Group", :name => "wheel", :gid => 20, - :mem => %w{root aj}, + :mem => %w{root aj} ) allow(Etc).to receive(:getgrnam).with("wheel").and_return(@pw_group) end diff --git a/spec/unit/provider/osx_profile_spec.rb b/spec/unit/provider/osx_profile_spec.rb index 6c997fbb4c..e307bc2c22 100644 --- a/spec/unit/provider/osx_profile_spec.rb +++ b/spec/unit/provider/osx_profile_spec.rb @@ -131,7 +131,7 @@ describe Chef::Provider::OsxProfile do new_resource.profile test_profile provider.load_current_resource expect( - provider.instance_variable_get(:@new_profile_identifier), + provider.instance_variable_get(:@new_profile_identifier) ).to eql(test_profile["PayloadIdentifier"]) end @@ -226,7 +226,7 @@ describe Chef::Provider::OsxProfile do new_resource.profile_name "com.testprofile.screensaver" new_resource.action(:remove) provider.load_current_resource - expect(provider.instance_variable_get(:@new_profile_identifier), + expect(provider.instance_variable_get(:@new_profile_identifier) ).to eql(new_resource.profile_name) end @@ -234,7 +234,7 @@ describe Chef::Provider::OsxProfile do new_resource.identifier "com.testprofile.screensaver" new_resource.action(:remove) provider.load_current_resource - expect(provider.instance_variable_get(:@new_profile_identifier), + expect(provider.instance_variable_get(:@new_profile_identifier) ).to eql(new_resource.identifier) end diff --git a/spec/unit/provider/package/apt_spec.rb b/spec/unit/provider/package/apt_spec.rb index f87c1e86bc..b5f0646b79 100644 --- a/spec/unit/provider/package/apt_spec.rb +++ b/spec/unit/provider/package/apt_spec.rb @@ -52,7 +52,7 @@ irssi: it "should create a current resource with the name of the new_resource" do expect(@provider).to receive(:shell_out!).with( "apt-cache policy #{@new_resource.package_name}", - :timeout => @timeout, + :timeout => @timeout ).and_return(@shell_out) @provider.load_current_resource @@ -95,7 +95,7 @@ libmysqlclient15-dev: virtual_package = double(:stdout => virtual_package_out, :exitstatus => 0) expect(@provider).to receive(:shell_out!).with( "apt-cache policy libmysqlclient15-dev", - :timeout => @timeout, + :timeout => @timeout ).and_return(virtual_package) showpkg_out = <<-SHOWPKG_STDOUT Package: libmysqlclient15-dev @@ -118,7 +118,7 @@ libmysqlclient-dev 5.1.41-3ubuntu12 showpkg = double(:stdout => showpkg_out, :exitstatus => 0) expect(@provider).to receive(:shell_out!).with( "apt-cache showpkg libmysqlclient15-dev", - :timeout => @timeout, + :timeout => @timeout ).and_return(showpkg) real_package_out = <<-RPKG_STDOUT libmysqlclient-dev: @@ -136,7 +136,7 @@ libmysqlclient-dev: real_package = double(:stdout => real_package_out, :exitstatus => 0) expect(@provider).to receive(:shell_out!).with( "apt-cache policy libmysqlclient-dev", - :timeout => @timeout, + :timeout => @timeout ).and_return(real_package) @provider.load_current_resource end @@ -152,7 +152,7 @@ mp3-decoder: virtual_package = double(:stdout => virtual_package_out, :exitstatus => 0) expect(@provider).to receive(:shell_out!).with( "apt-cache policy mp3-decoder", - :timeout => @timeout, + :timeout => @timeout ).and_return(virtual_package) showpkg_out = <<-SHOWPKG_STDOUT Package: mp3-decoder @@ -178,7 +178,7 @@ mpg123 1.12.1-0ubuntu1 showpkg = double(:stdout => showpkg_out, :exitstatus => 0) expect(@provider).to receive(:shell_out!).with( "apt-cache showpkg mp3-decoder", - :timeout => @timeout, + :timeout => @timeout ).and_return(showpkg) expect { @provider.load_current_resource }.to raise_error(Chef::Exceptions::Package) end @@ -191,7 +191,7 @@ mpg123 1.12.1-0ubuntu1 allow(@new_resource).to receive(:provider).and_return(nil) expect(@provider).to receive(:shell_out!).with( "apt-cache -o APT::Default-Release=lenny-backports policy irssi", - :timeout => @timeout, + :timeout => @timeout ).and_return(@shell_out) @provider.load_current_resource end @@ -200,7 +200,7 @@ mpg123 1.12.1-0ubuntu1 @new_resource.source "pluto" expect(@provider).to receive(:shell_out!).with( "apt-cache policy #{@new_resource.package_name}", - :timeout => @timeout, + :timeout => @timeout ).and_return(@shell_out) @provider.load_current_resource @provider.define_resource_requirements @@ -220,7 +220,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!). with( "apt-get -q -y install irssi=0.8.12-7", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @provider.install_package("irssi", "0.8.12-7") end @@ -229,7 +229,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "apt-get -q -y --force-yes install irssi=0.8.12-7", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @new_resource.options("--force-yes") @provider.install_package("irssi", "0.8.12-7") @@ -245,7 +245,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "apt-get -q -y -o APT::Default-Release=lenny-backports install irssi=0.8.12-7", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @provider.install_package("irssi", "0.8.12-7") @@ -266,7 +266,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "apt-get -q -y remove irssi", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @provider.remove_package("irssi", "0.8.12-7") end @@ -275,7 +275,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "apt-get -q -y --force-yes remove irssi", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @new_resource.options("--force-yes") @@ -289,7 +289,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "apt-get -q -y purge irssi", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @provider.purge_package("irssi", "0.8.12-7") end @@ -298,7 +298,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "apt-get -q -y --force-yes purge irssi", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @new_resource.options("--force-yes") @@ -317,7 +317,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "debconf-set-selections /tmp/irssi-0.8.12-7.seed", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @provider.preseed_package(file) @@ -327,7 +327,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "debconf-set-selections /tmp/irssi-0.8.12-7.seed", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) file = @provider.get_preseed_file("irssi", "0.8.12-7") @provider.preseed_package(file) @@ -348,7 +348,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "dpkg-reconfigure irssi", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @provider.reconfig_package("irssi", "0.8.12-7") end @@ -360,7 +360,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "apt-get -q -y install libmysqlclient-dev", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @provider.install_package("libmysqlclient-dev", "not_a_real_version") end @@ -374,7 +374,7 @@ mpg123 1.12.1-0ubuntu1 expect(@provider).to receive(:shell_out!).with( "apt-get -q -y install libmysqlclient-dev irssi=0.8.12-7", :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, - :timeout => @timeout, + :timeout => @timeout ) @provider.install_package(["libmysqlclient-dev", "irssi"], ["not_a_real_version", "0.8.12-7"]) end diff --git a/spec/unit/provider/package/chocolatey_spec.rb b/spec/unit/provider/package/chocolatey_spec.rb index 37b3ef8ccb..a347aa7ebd 100644 --- a/spec/unit/provider/package/chocolatey_spec.rb +++ b/spec/unit/provider/package/chocolatey_spec.rb @@ -132,7 +132,7 @@ munin-node|1.6.1.20130823 it "should load and downcase names in the installed_packages hash" do provider.load_current_resource expect(provider.send(:installed_packages)).to eql( - { "chocolatey" => "0.9.9.11", "conemu" => "15.10.25.0" }, + { "chocolatey" => "0.9.9.11", "conemu" => "15.10.25.0" } ) end @@ -140,7 +140,7 @@ munin-node|1.6.1.20130823 allow_remote_list(["git"]) provider.load_current_resource expect(provider.send(:available_packages)).to eql( - { "chocolatey" => "0.9.9.11", "conemu" => "15.10.25.1", "git" => "2.6.2", "munin-node" => "1.6.1.20130823" }, + { "chocolatey" => "0.9.9.11", "conemu" => "15.10.25.1", "git" => "2.6.2", "munin-node" => "1.6.1.20130823" } ) end diff --git a/spec/unit/provider/package/dpkg_spec.rb b/spec/unit/provider/package/dpkg_spec.rb index 0d651b238a..613f7a326e 100644 --- a/spec/unit/provider/package/dpkg_spec.rb +++ b/spec/unit/provider/package/dpkg_spec.rb @@ -199,7 +199,7 @@ Section: ruby it "and we should raise if we get any other exit codes from dpkg -s" do dpkg_s_status = double( - exitstatus: 3, stderr: "i am very, very angry with you. i'm very, very cross. go to your room.", stdout: "", + exitstatus: 3, stderr: "i am very, very angry with you. i'm very, very cross. go to your room.", stdout: "" ) expect(provider).to receive(:shell_out!).with("dpkg -s #{package}", returns: [0, 1], timeout: 900).and_raise(Mixlib::ShellOut::ShellCommandFailed) expect { provider.load_current_resource }.to raise_error(Mixlib::ShellOut::ShellCommandFailed) diff --git a/spec/unit/provider/package/easy_install_spec.rb b/spec/unit/provider/package/easy_install_spec.rb index 681365b98b..79a5889f9f 100644 --- a/spec/unit/provider/package/easy_install_spec.rb +++ b/spec/unit/provider/package/easy_install_spec.rb @@ -63,14 +63,14 @@ describe Chef::Provider::Package::EasyInstall do it "should run easy_install with the package name and version" do expect(@provider).to receive(:run_command).with({ :command => "easy_install \"boto==1.8d\"", - },) + }) @provider.install_package("boto", "1.8d") end it "should run easy_install with the package name and version and specified options" do expect(@provider).to receive(:run_command).with({ :command => "easy_install --always-unzip \"boto==1.8d\"", - },) + }) allow(@new_resource).to receive(:options).and_return("--always-unzip") @provider.install_package("boto", "1.8d") end @@ -78,21 +78,21 @@ describe Chef::Provider::Package::EasyInstall do it "should run easy_install with the package name and version" do expect(@provider).to receive(:run_command).with({ :command => "easy_install \"boto==1.8d\"", - },) + }) @provider.upgrade_package("boto", "1.8d") end it "should run easy_install -m with the package name and version" do expect(@provider).to receive(:run_command).with({ :command => "easy_install -m boto", - },) + }) @provider.remove_package("boto", "1.8d") end it "should run easy_install -m with the package name and version and specified options" do expect(@provider).to receive(:run_command).with({ :command => "easy_install -x -m boto", - },) + }) allow(@new_resource).to receive(:options).and_return("-x") @provider.remove_package("boto", "1.8d") end @@ -100,7 +100,7 @@ describe Chef::Provider::Package::EasyInstall do it "should run easy_install -m with the package name and version" do expect(@provider).to receive(:run_command).with({ :command => "easy_install -m boto", - },) + }) @provider.purge_package("boto", "1.8d") end diff --git a/spec/unit/provider/package/openbsd_spec.rb b/spec/unit/provider/package/openbsd_spec.rb index 48802f48ce..3e1c1c90b6 100644 --- a/spec/unit/provider/package/openbsd_spec.rb +++ b/spec/unit/provider/package/openbsd_spec.rb @@ -56,7 +56,7 @@ describe Chef::Provider::Package::Openbsd do instance_double("shellout", :stdout => "#{name}-#{version}\n")) expect(provider).to receive(:shell_out!).with( "pkg_add -r #{name}-#{version}", - { :env => { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 }, + { :env => { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 } ) { OpenStruct.new :status => true } provider.run_action(:install) end @@ -88,7 +88,7 @@ describe Chef::Provider::Package::Openbsd do instance_double("shellout", :stdout => "#{name}-#{version}-#{flavor}\n")) expect(provider).to receive(:shell_out!).with( "pkg_add -r #{name}-#{version}-#{flavor}", - { env: { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 }, + { env: { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 } ) { OpenStruct.new :status => true } provider.run_action(:install) end @@ -104,7 +104,7 @@ describe Chef::Provider::Package::Openbsd do new_resource.version("#{version}-#{flavor_b}") expect(provider).to receive(:shell_out!).with( "pkg_add -r #{name}-#{version}-#{flavor_b}", - { env: { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 }, + { env: { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 } ) { OpenStruct.new :status => true } provider.run_action(:install) end diff --git a/spec/unit/provider/package/yum_spec.rb b/spec/unit/provider/package/yum_spec.rb index bb071a6559..3fb60ea10d 100644 --- a/spec/unit/provider/package/yum_spec.rb +++ b/spec/unit/provider/package/yum_spec.rb @@ -36,7 +36,7 @@ describe Chef::Provider::Package::Yum do :version_available? => true, :allow_multi_install => [ "kernel" ], :package_repository => "base", - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -133,7 +133,7 @@ describe Chef::Provider::Package::Yum do it "should set the arch if no existing package_name is found and new_package_name+new_arch is available" do @new_resource = Chef::Resource::YumPackage.new("testing.noarch") @yum_cache = double( - "Chef::Provider::Yum::YumCache", + "Chef::Provider::Yum::YumCache" ) allow(@yum_cache).to receive(:installed_version) do |package_name, arch| # nothing installed for package_name/new_package_name @@ -188,7 +188,7 @@ describe Chef::Provider::Package::Yum do it "should not set the arch when an existing package_name is found" do @new_resource = Chef::Resource::YumPackage.new("testing.beta3") @yum_cache = double( - "Chef::Provider::Yum::YumCache", + "Chef::Provider::Yum::YumCache" ) allow(@yum_cache).to receive(:installed_version) do |package_name, arch| # installed for package_name @@ -224,7 +224,7 @@ describe Chef::Provider::Package::Yum do it "should not set the arch when no existing package_name or new_package_name+new_arch is found" do @new_resource = Chef::Resource::YumPackage.new("testing.beta3") @yum_cache = double( - "Chef::Provider::Yum::YumCache", + "Chef::Provider::Yum::YumCache" ) allow(@yum_cache).to receive(:installed_version) do |package_name, arch| # nothing installed for package_name/new_package_name @@ -256,7 +256,7 @@ describe Chef::Provider::Package::Yum do @new_resource = Chef::Resource::YumPackage.new("testing.i386") @new_resource.arch("x86_64") @yum_cache = double( - "Chef::Provider::Yum::YumCache", + "Chef::Provider::Yum::YumCache" ) allow(@yum_cache).to receive(:installed_version) do |package_name, arch| # nothing installed for package_name/new_package_name @@ -320,7 +320,7 @@ describe Chef::Provider::Package::Yum do :candidate_version => "2.0.1.el5", :package_available? => false, :version_available? => true, - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) } @@ -393,7 +393,7 @@ describe Chef::Provider::Package::Yum do :candidate_version => "2.0.1.el5", :package_available? => false, :version_available? => true, - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -415,7 +415,7 @@ describe Chef::Provider::Package::Yum do :candidate_version => "1.2.4-11.18.el5", :package_available? => false, :version_available? => true, - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -438,7 +438,7 @@ describe Chef::Provider::Package::Yum do :candidate_version => "2.0.1.el5", :package_available? => false, :version_available? => true, - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -463,7 +463,7 @@ describe Chef::Provider::Package::Yum do :candidate_version => "1.2.4-11.18.el5", :package_available? => false, :version_available? => true, - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -483,7 +483,7 @@ describe Chef::Provider::Package::Yum do :candidate_version => "1.2.4-11.18.el5", :package_available? => false, :version_available? => true, - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -508,7 +508,7 @@ describe Chef::Provider::Package::Yum do :candidate_version => "1.2.4-11.18.el5", :package_available? => false, :version_available? => true, - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -524,7 +524,7 @@ describe Chef::Provider::Package::Yum do @provider.load_current_resource allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1) expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y install cups-1.2.4-11.19.el5", + "-d0 -e0 -y install cups-1.2.4-11.19.el5" ) @provider.install_package("cups", "1.2.4-11.19.el5") end @@ -532,7 +532,7 @@ describe Chef::Provider::Package::Yum do it "should run yum localinstall if given a path to an rpm" do allow(@new_resource).to receive(:source).and_return("/tmp/emacs-21.4-20.el5.i386.rpm") expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y localinstall /tmp/emacs-21.4-20.el5.i386.rpm", + "-d0 -e0 -y localinstall /tmp/emacs-21.4-20.el5.i386.rpm" ) @provider.install_package("emacs", "21.4-20.el5") end @@ -543,7 +543,7 @@ describe Chef::Provider::Package::Yum do @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) expect(@new_resource.source).to eq("/tmp/emacs-21.4-20.el5.i386.rpm") expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y localinstall /tmp/emacs-21.4-20.el5.i386.rpm", + "-d0 -e0 -y localinstall /tmp/emacs-21.4-20.el5.i386.rpm" ) @provider.install_package("/tmp/emacs-21.4-20.el5.i386.rpm", "21.4-20.el5") end @@ -553,7 +553,7 @@ describe Chef::Provider::Package::Yum do allow(@new_resource).to receive(:arch).and_return("i386") allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1) expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y install cups-1.2.4-11.19.el5.i386", + "-d0 -e0 -y install cups-1.2.4-11.19.el5.i386" ) @provider.install_package("cups", "1.2.4-11.19.el5") end @@ -564,7 +564,7 @@ describe Chef::Provider::Package::Yum do allow(@new_resource).to receive(:options).and_return("--disablerepo epmd") allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1) expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y --disablerepo epmd install cups-11", + "-d0 -e0 -y --disablerepo epmd install cups-11" ) @provider.install_package(@new_resource.name, @provider.candidate_version) end @@ -578,7 +578,7 @@ describe Chef::Provider::Package::Yum do :candidate_version => "1.2.4-11.18.el5_2.3", :package_available? => true, :version_available? => nil, - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -597,7 +597,7 @@ describe Chef::Provider::Package::Yum do :package_available? => true, :version_available? => true, :allow_multi_install => [ "kernel" ], - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -617,14 +617,14 @@ describe Chef::Provider::Package::Yum do :version_available? => true, :allow_multi_install => [ "cups" ], :package_repository => "base", - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @provider.load_current_resource expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y install cups-1.2.4-11.15.el5", + "-d0 -e0 -y install cups-1.2.4-11.15.el5" ) @provider.install_package("cups", "1.2.4-11.15.el5") end @@ -641,14 +641,14 @@ describe Chef::Provider::Package::Yum do :version_available? => true, :allow_multi_install => [], :package_repository => "base", - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @provider.load_current_resource expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y downgrade cups-1.2.4-11.15.el5", + "-d0 -e0 -y downgrade cups-1.2.4-11.15.el5" ) @provider.install_package("cups", "1.2.4-11.15.el5") end @@ -658,7 +658,7 @@ describe Chef::Provider::Package::Yum do @provider.load_current_resource allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1) expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y install cups-1.2.4-11.15.el5", + "-d0 -e0 -y install cups-1.2.4-11.15.el5" ) expect(@yum_cache).to receive(:reload).once @provider.install_package("cups", "1.2.4-11.15.el5") @@ -669,7 +669,7 @@ describe Chef::Provider::Package::Yum do @provider.load_current_resource allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1) expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y install cups-1.2.4-11.15.el5", + "-d0 -e0 -y install cups-1.2.4-11.15.el5" ) expect(@yum_cache).not_to receive(:reload) @provider.install_package("cups", "1.2.4-11.15.el5") @@ -682,7 +682,7 @@ describe Chef::Provider::Package::Yum do allow(@provider).to receive(:candidate_version).and_return("11") allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1) expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y install cups-11", + "-d0 -e0 -y install cups-11" ) @provider.upgrade_package(@new_resource.name, @provider.candidate_version) end @@ -693,7 +693,7 @@ describe Chef::Provider::Package::Yum do allow(@provider).to receive(:candidate_version).and_return("11") allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1) expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y install cups-11", + "-d0 -e0 -y install cups-11" ) @provider.upgrade_package(@new_resource.name, @provider.candidate_version) end @@ -708,7 +708,7 @@ describe Chef::Provider::Package::Yum do :package_available? => true, :version_available? => true, :allow_multi_install => [ "kernel" ], - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -724,7 +724,7 @@ describe Chef::Provider::Package::Yum do allow(@provider).to receive(:candidate_version).and_return("11") expect(@provider).to receive(:upgrade_package).with( "cups", - "11", + "11" ) @provider.run_action(:upgrade) end @@ -743,7 +743,7 @@ describe Chef::Provider::Package::Yum do allow(@provider).to receive(:candidate_version).and_return("11") expect(@provider).to receive(:upgrade_package).with( "cups", - "11", + "11" ) @provider.run_action(:upgrade) end @@ -761,7 +761,7 @@ describe Chef::Provider::Package::Yum do describe "when removing a package" do it "should run yum remove with the package name" do expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y remove emacs-1.0", + "-d0 -e0 -y remove emacs-1.0" ) @provider.remove_package("emacs", "1.0") end @@ -769,7 +769,7 @@ describe Chef::Provider::Package::Yum do it "should run yum remove with the package name and arch" do allow(@new_resource).to receive(:arch).and_return("x86_64") expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y remove emacs-1.0.x86_64", + "-d0 -e0 -y remove emacs-1.0.x86_64" ) @provider.remove_package("emacs", "1.0") end @@ -778,7 +778,7 @@ describe Chef::Provider::Package::Yum do describe "when purging a package" do it "should run yum remove with the package name" do expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y remove emacs-1.0", + "-d0 -e0 -y remove emacs-1.0" ) @provider.purge_package("emacs", "1.0") end @@ -790,7 +790,7 @@ describe Chef::Provider::Package::Yum do allow(@provider).to receive(:shell_out).and_return(@status) expect(@provider).to receive(:shell_out).once.with( "yum -d0 -e0 -y install emacs-1.0", - { :timeout => Chef::Config[:yum_timeout] }, + { :timeout => Chef::Config[:yum_timeout] } ) @provider.yum_command("-d0 -e0 -y install emacs-1.0") end @@ -800,7 +800,7 @@ describe Chef::Provider::Package::Yum do allow(@provider).to receive(:shell_out).and_return(@status) expect(@provider).to receive(:shell_out).once.with( "yum -d0 -e0 -y install emacs-1.0", - { :timeout => Chef::Config[:yum_timeout] }, + { :timeout => Chef::Config[:yum_timeout] } ) expect { @provider.yum_command("-d0 -e0 -y install emacs-1.0") }.to raise_error(Chef::Exceptions::Exec) end @@ -811,7 +811,7 @@ describe Chef::Provider::Package::Yum do allow(@provider).to receive(:shell_out).and_return(@status) expect(@provider).to receive(:shell_out).once.with( "yum -d0 -e0 -y install emacs-1.0", - { :timeout => Chef::Config[:yum_timeout] }, + { :timeout => Chef::Config[:yum_timeout] } ) # will still raise an exception, can't stub out the subsequent call expect { @provider.yum_command("-d0 -e0 -y install emacs-1.0") }.to raise_error(Chef::Exceptions::Exec) @@ -823,7 +823,7 @@ describe Chef::Provider::Package::Yum do allow(@provider).to receive(:shell_out).and_return(@status) expect(@provider).to receive(:shell_out).twice.with( "yum -d0 -e0 -y install emacs-1.0", - { :timeout => Chef::Config[:yum_timeout] }, + { :timeout => Chef::Config[:yum_timeout] } ) # will still raise an exception, can't stub out the subsequent call expect { @provider.yum_command("-d0 -e0 -y install emacs-1.0") }.to raise_error(Chef::Exceptions::Exec) @@ -837,7 +837,7 @@ describe Chef::Provider::Package::Yum do allow(@provider).to receive(:shell_out).and_return(@status) expect(@provider).to receive(:shell_out).once.with( "yum-deprecated -d0 -e0 -y install emacs-1.0", - { :timeout => Chef::Config[:yum_timeout] }, + { :timeout => Chef::Config[:yum_timeout] } ) @provider.yum_command("-d0 -e0 -y install emacs-1.0") end @@ -2125,7 +2125,7 @@ describe "Chef::Provider::Package::Yum - Multi" do :version_available? => true, :allow_multi_install => [ "kernel" ], :package_repository => "base", - :disable_extra_repo_control => true, + :disable_extra_repo_control => true ) allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache) allow(@yum_cache).to receive(:yum_binary=).with("yum") @@ -2211,7 +2211,7 @@ describe "Chef::Provider::Package::Yum - Multi" do allow(@yum_cache).to receive(:installed_version).with("cups", nil).and_return("1.2.4-11.18.el5") allow(@yum_cache).to receive(:installed_version).with("vim", nil).and_return("0.9") expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y install cups-1.2.4-11.19.el5 vim-1.0", + "-d0 -e0 -y install cups-1.2.4-11.19.el5 vim-1.0" ) @provider.install_package(%w{cups vim}, ["1.2.4-11.19.el5", "1.0"]) end @@ -2221,7 +2221,7 @@ describe "Chef::Provider::Package::Yum - Multi" do allow(@new_resource).to receive(:arch).and_return("i386") allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1) expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y install cups-1.2.4-11.19.el5.i386 vim-1.0.i386", + "-d0 -e0 -y install cups-1.2.4-11.19.el5.i386 vim-1.0.i386" ) @provider.install_package(%w{cups vim}, ["1.2.4-11.19.el5", "1.0"]) end @@ -2232,7 +2232,7 @@ describe "Chef::Provider::Package::Yum - Multi" do allow(@yum_cache).to receive(:installed_version).with("cups", nil).and_return("1.2.4-11.18.el5") allow(@yum_cache).to receive(:installed_version).with("vim", nil).and_return("0.9") expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y --disablerepo epmd install cups-1.2.4-11.19.el5 vim-1.0", + "-d0 -e0 -y --disablerepo epmd install cups-1.2.4-11.19.el5 vim-1.0" ) allow(@new_resource).to receive(:options).and_return("--disablerepo epmd") @provider.install_package(%w{cups vim}, ["1.2.4-11.19.el5", "1.0"]) @@ -2258,7 +2258,7 @@ describe "Chef::Provider::Package::Yum - Multi" do @provider.load_current_resource expect(@provider).to receive(:yum_command).with( - "-d0 -e0 -y install cups-1.2.4-11.19.el5.x86_64 vim-1.0", + "-d0 -e0 -y install cups-1.2.4-11.19.el5.x86_64 vim-1.0" ) @provider.install_package(%w{cups vim}, ["1.2.4-11.19.el5", "1.0"]) end diff --git a/spec/unit/provider/package/zypper_spec.rb b/spec/unit/provider/package/zypper_spec.rb index 4def0f5558..df0a1da9a2 100644 --- a/spec/unit/provider/package/zypper_spec.rb +++ b/spec/unit/provider/package/zypper_spec.rb @@ -61,7 +61,7 @@ describe Chef::Provider::Package::Zypper do it "should run zypper info with the package name" do shell_out_expectation!( - "zypper --non-interactive info #{new_resource.package_name}", + "zypper --non-interactive info #{new_resource.package_name}" ).and_return(status) provider.load_current_resource end @@ -97,23 +97,23 @@ describe Chef::Provider::Package::Zypper do it "should run zypper install with the package name and version" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(true) shell_out_expectation!( - "zypper --non-interactive install --auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive install --auto-agree-with-licenses emacs=1.0" ) provider.install_package(["emacs"], ["1.0"]) end it "should run zypper install without gpg checks" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0" ) provider.install_package(["emacs"], ["1.0"]) end it "should warn about gpg checks on zypper install" do expect(Chef::Log).to receive(:warn).with( - /All packages will be installed without gpg signature checks/, + /All packages will be installed without gpg signature checks/ ) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0" ) provider.install_package(["emacs"], ["1.0"]) end @@ -123,29 +123,29 @@ describe Chef::Provider::Package::Zypper do it "should run zypper update with the package name and version" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(true) shell_out_expectation!( - "zypper --non-interactive install --auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive install --auto-agree-with-licenses emacs=1.0" ) provider.upgrade_package(["emacs"], ["1.0"]) end it "should run zypper update without gpg checks" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0" ) provider.upgrade_package(["emacs"], ["1.0"]) end it "should warn about gpg checks on zypper upgrade" do expect(Chef::Log).to receive(:warn).with( - /All packages will be installed without gpg signature checks/, + /All packages will be installed without gpg signature checks/ ) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0" ) provider.upgrade_package(["emacs"], ["1.0"]) end it "should run zypper upgrade without gpg checks" do shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0" ) provider.upgrade_package(["emacs"], ["1.0"]) end @@ -157,7 +157,7 @@ describe Chef::Provider::Package::Zypper do it "should run zypper remove with the package name" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(true) shell_out_expectation!( - "zypper --non-interactive remove emacs", + "zypper --non-interactive remove emacs" ) provider.remove_package(["emacs"], [nil]) end @@ -167,23 +167,23 @@ describe Chef::Provider::Package::Zypper do it "should run zypper remove with the package name" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(true) shell_out_expectation!( - "zypper --non-interactive remove emacs=1.0", + "zypper --non-interactive remove emacs=1.0" ) provider.remove_package(["emacs"], ["1.0"]) end it "should run zypper remove without gpg checks" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove emacs=1.0", + "zypper --non-interactive --no-gpg-checks remove emacs=1.0" ) provider.remove_package(["emacs"], ["1.0"]) end it "should warn about gpg checks on zypper remove" do expect(Chef::Log).to receive(:warn).with( - /All packages will be installed without gpg signature checks/, + /All packages will be installed without gpg signature checks/ ) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove emacs=1.0", + "zypper --non-interactive --no-gpg-checks remove emacs=1.0" ) provider.remove_package(["emacs"], ["1.0"]) end @@ -193,23 +193,23 @@ describe Chef::Provider::Package::Zypper do describe "purge_package" do it "should run remove with the name and version and --clean-deps" do shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0", + "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0" ) provider.purge_package(["emacs"], ["1.0"]) end it "should run zypper purge without gpg checks" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0", + "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0" ) provider.purge_package(["emacs"], ["1.0"]) end it "should warn about gpg checks on zypper purge" do expect(Chef::Log).to receive(:warn).with( - /All packages will be installed without gpg signature checks/, + /All packages will be installed without gpg signature checks/ ) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0", + "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0" ) provider.purge_package(["emacs"], ["1.0"]) end @@ -223,7 +223,7 @@ describe Chef::Provider::Package::Zypper do describe "install_package" do it "should run zypper install with the package name and version" do shell_out_expectation!( - "zypper --no-gpg-checks install --auto-agree-with-licenses -y emacs", + "zypper --no-gpg-checks install --auto-agree-with-licenses -y emacs" ) provider.install_package(["emacs"], ["1.0"]) end @@ -232,7 +232,7 @@ describe Chef::Provider::Package::Zypper do describe "upgrade_package" do it "should run zypper update with the package name and version" do shell_out_expectation!( - "zypper --no-gpg-checks install --auto-agree-with-licenses -y emacs", + "zypper --no-gpg-checks install --auto-agree-with-licenses -y emacs" ) provider.upgrade_package(["emacs"], ["1.0"]) end @@ -241,7 +241,7 @@ describe Chef::Provider::Package::Zypper do describe "remove_package" do it "should run zypper remove with the package name" do shell_out_expectation!( - "zypper --no-gpg-checks remove -y emacs", + "zypper --no-gpg-checks remove -y emacs" ) provider.remove_package(["emacs"], ["1.0"]) end @@ -252,7 +252,7 @@ describe Chef::Provider::Package::Zypper do it "should install an array of package names and versions" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0 vim=2.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0 vim=2.0" ) provider.install_package(%w{emacs vim}, ["1.0", "2.0"]) end @@ -260,7 +260,7 @@ describe Chef::Provider::Package::Zypper do it "should remove an array of package names and versions" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove emacs=1.0 vim=2.0", + "zypper --non-interactive --no-gpg-checks remove emacs=1.0 vim=2.0" ) provider.remove_package(%w{emacs vim}, ["1.0", "2.0"]) end diff --git a/spec/unit/provider/package_spec.rb b/spec/unit/provider/package_spec.rb index d0d20a4372..abf0322868 100644 --- a/spec/unit/provider/package_spec.rb +++ b/spec/unit/provider/package_spec.rb @@ -58,11 +58,11 @@ describe Chef::Provider::Package do new_resource.response_file("foo") expect(provider).to receive(:get_preseed_file).with( new_resource.name, - provider.candidate_version, + provider.candidate_version ).and_return("/var/cache/preseed-test") expect(provider).to receive(:preseed_package).with( - "/var/cache/preseed-test", + "/var/cache/preseed-test" ).and_return(true) provider.run_action(:install) end @@ -75,7 +75,7 @@ describe Chef::Provider::Package do it "should install the package at the candidate_version if it is not already installed" do expect(provider).to receive(:install_package).with( new_resource.name, - provider.candidate_version, + provider.candidate_version ).and_return(true) provider.run_action(:install) expect(new_resource).to be_updated_by_last_action @@ -85,7 +85,7 @@ describe Chef::Provider::Package do new_resource.version("1.0") expect(provider).to receive(:install_package).with( new_resource.name, - new_resource.version, + new_resource.version ).and_return(true) provider.run_action(:install) expect(new_resource).to be_updated_by_last_action @@ -96,7 +96,7 @@ describe Chef::Provider::Package do allow(current_resource).to receive(:version).and_return("0.99") expect(provider).to receive(:install_package).with( new_resource.name, - new_resource.version, + new_resource.version ).and_return(true) provider.run_action(:install) expect(new_resource).to be_updated_by_last_action @@ -144,7 +144,7 @@ describe Chef::Provider::Package do it "should upgrade the package if the current version is not the candidate version" do expect(provider).to receive(:upgrade_package).with( new_resource.name, - provider.candidate_version, + provider.candidate_version ).and_return(true) provider.run_action(:upgrade) expect(new_resource).to be_updated_by_last_action @@ -468,7 +468,7 @@ describe "Subclass with use_multipackage_api" do provider.candidate_version = [ "1.0" ] expect(provider).to receive(:install_package).with( [ "vim" ], - [ "1.0" ], + [ "1.0" ] ).and_return(true) provider.run_action(:install) expect(new_resource).to be_updated_by_last_action @@ -481,7 +481,7 @@ describe "Subclass with use_multipackage_api" do provider.candidate_version = [ "1.0" ] expect(provider).to receive(:install_package).with( [ "vim" ], - [ "1.0" ], + [ "1.0" ] ).and_return(true) provider.run_action(:install) expect(new_resource).to be_updated_by_last_action @@ -494,7 +494,7 @@ describe "Subclass with use_multipackage_api" do provider.candidate_version = [ "1.0" ] expect(provider).to receive(:upgrade_package).with( [ "vim" ], - [ "1.0" ], + [ "1.0" ] ).and_return(true) provider.run_action(:upgrade) expect(new_resource).to be_updated_by_last_action @@ -507,7 +507,7 @@ describe "Subclass with use_multipackage_api" do provider.candidate_version = [ "1.0" ] expect(provider).to receive(:upgrade_package).with( [ "vim" ], - [ "1.0" ], + [ "1.0" ] ).and_return(true) provider.run_action(:upgrade) expect(new_resource).to be_updated_by_last_action @@ -521,7 +521,7 @@ describe "Subclass with use_multipackage_api" do provider.candidate_version = [ "1.0" ] expect(provider).to receive(:remove_package).with( [ "vim" ], - [ nil ], + [ nil ] ).and_return(true) provider.run_action(:remove) expect(new_resource).to be_updated_by_last_action @@ -535,7 +535,7 @@ describe "Subclass with use_multipackage_api" do provider.candidate_version = [ "1.0" ] expect(provider).to receive(:purge_package).with( [ "vim" ], - [ nil ], + [ nil ] ).and_return(true) provider.run_action(:purge) expect(new_resource).to be_updated_by_last_action @@ -552,7 +552,7 @@ describe "Subclass with use_multipackage_api" do allow(provider).to receive(:reconfig_package).and_return(true) expect(provider).to receive(:reconfig_package).with( [ "vim" ], - [ "1.0" ], + [ "1.0" ] ).and_return(true) provider.run_action(:reconfig) expect(new_resource).to be_updated_by_last_action @@ -582,7 +582,7 @@ describe "Chef::Provider::Package - Multi" do it "installs the candidate versions when none are installed" do expect(provider).to receive(:install_package).with( %w{emacs vi}, - ["1.0", "6.2"], + ["1.0", "6.2"] ).and_return(true) provider.run_action(:install) expect(new_resource).to be_updated @@ -591,7 +591,7 @@ describe "Chef::Provider::Package - Multi" do it "installs the candidate versions when some are installed" do expect(provider).to receive(:install_package).with( [ "vi" ], - [ "6.2" ], + [ "6.2" ] ).and_return(true) current_resource.version(["1.0", nil]) provider.run_action(:install) @@ -675,7 +675,7 @@ describe "Chef::Provider::Package - Multi" do current_resource.version ["0.9", "6.1"] expect(provider).to receive(:upgrade_package).with( new_resource.package_name, - provider.candidate_version, + provider.candidate_version ).and_return(true) provider.run_action(:upgrade) expect(new_resource).to be_updated_by_last_action @@ -685,7 +685,7 @@ describe "Chef::Provider::Package - Multi" do current_resource.version ["1.0", "6.1"] expect(provider).to receive(:upgrade_package).with( ["vi"], - ["6.2"], + ["6.2"] ).and_return(true) provider.run_action(:upgrade) expect(new_resource).to be_updated_by_last_action diff --git a/spec/unit/provider_resolver_spec.rb b/spec/unit/provider_resolver_spec.rb index f85c46c836..5d4396ea4d 100644 --- a/spec/unit/provider_resolver_spec.rb +++ b/spec/unit/provider_resolver_spec.rb @@ -248,7 +248,7 @@ describe Chef::ProviderResolver do Chef::Provider::Service::Debian, Chef::Provider::Service::Init, Chef::Provider::Service::Invokercd, - Chef::Provider::Service::Upstart, + Chef::Provider::Service::Upstart ) end @@ -256,10 +256,10 @@ describe Chef::ProviderResolver do expect(provider_resolver.supported_handlers).to include( Chef::Provider::Service::Debian, Chef::Provider::Service::Init, - Chef::Provider::Service::Invokercd, + Chef::Provider::Service::Invokercd ) expect(provider_resolver.supported_handlers).to_not include( - Chef::Provider::Service::Upstart, + Chef::Provider::Service::Upstart ) end @@ -279,7 +279,7 @@ describe Chef::ProviderResolver do Chef::Provider::Service::Debian, Chef::Provider::Service::Init, Chef::Provider::Service::Invokercd, - Chef::Provider::Service::Upstart, + Chef::Provider::Service::Upstart ) end @@ -288,7 +288,7 @@ describe Chef::ProviderResolver do Chef::Provider::Service::Debian, Chef::Provider::Service::Init, Chef::Provider::Service::Invokercd, - Chef::Provider::Service::Upstart, + Chef::Provider::Service::Upstart ) end @@ -308,18 +308,18 @@ describe Chef::ProviderResolver do Chef::Provider::Service::Debian, Chef::Provider::Service::Init, Chef::Provider::Service::Invokercd, - Chef::Provider::Service::Upstart, + Chef::Provider::Service::Upstart ) end it "supports only the upstart handler" do expect(provider_resolver.supported_handlers).to include( - Chef::Provider::Service::Upstart, + Chef::Provider::Service::Upstart ) expect(provider_resolver.supported_handlers).to_not include( Chef::Provider::Service::Debian, Chef::Provider::Service::Init, - Chef::Provider::Service::Invokercd, + Chef::Provider::Service::Invokercd ) end @@ -339,7 +339,7 @@ describe Chef::ProviderResolver do Chef::Provider::Service::Debian, Chef::Provider::Service::Init, Chef::Provider::Service::Invokercd, - Chef::Provider::Service::Upstart, + Chef::Provider::Service::Upstart ) end @@ -348,7 +348,7 @@ describe Chef::ProviderResolver do Chef::Provider::Service::Upstart, Chef::Provider::Service::Debian, Chef::Provider::Service::Init, - Chef::Provider::Service::Invokercd, + Chef::Provider::Service::Invokercd ) end diff --git a/spec/unit/resource/apt_package_spec.rb b/spec/unit/resource/apt_package_spec.rb index 41cdb04a1e..78eccfb444 100644 --- a/spec/unit/resource/apt_package_spec.rb +++ b/spec/unit/resource/apt_package_spec.rb @@ -26,7 +26,7 @@ describe Chef::Resource::AptPackage, "initialize" do provider: Chef::Provider::Package::Apt, name: :apt_package, action: :install, - os: "linux", + os: "linux" ) let(:resource) { Chef::Resource::AptPackage.new("foo") } diff --git a/spec/unit/resource/breakpoint_spec.rb b/spec/unit/resource/breakpoint_spec.rb index 585bcadc68..a5b27bae16 100644 --- a/spec/unit/resource/breakpoint_spec.rb +++ b/spec/unit/resource/breakpoint_spec.rb @@ -25,7 +25,7 @@ describe Chef::Resource::Breakpoint do resource: Chef::Resource::Breakpoint, provider: Chef::Provider::Breakpoint, name: :breakpoint, - action: :break, + action: :break ) before do diff --git a/spec/unit/resource/chef_gem_spec.rb b/spec/unit/resource/chef_gem_spec.rb index 1b1439d7f2..0de9247196 100644 --- a/spec/unit/resource/chef_gem_spec.rb +++ b/spec/unit/resource/chef_gem_spec.rb @@ -26,7 +26,7 @@ describe Chef::Resource::ChefGem, "initialize" do resource: Chef::Resource::ChefGem, provider: Chef::Provider::Package::Rubygems, name: :chef_gem, - action: :install, + action: :install ) end diff --git a/spec/unit/resource/deploy_revision_spec.rb b/spec/unit/resource/deploy_revision_spec.rb index 4cbae68ca2..aa12b9595d 100644 --- a/spec/unit/resource/deploy_revision_spec.rb +++ b/spec/unit/resource/deploy_revision_spec.rb @@ -25,7 +25,7 @@ describe Chef::Resource::DeployRevision do resource: Chef::Resource::DeployRevision, provider: Chef::Provider::Deploy::Revision, name: :deploy_revision, - action: :deploy, + action: :deploy ) end @@ -36,7 +36,7 @@ describe Chef::Resource::DeployBranch do resource: Chef::Resource::DeployBranch, provider: Chef::Provider::Deploy::Revision, name: :deploy_branch, - action: :deploy, + action: :deploy ) end diff --git a/spec/unit/resource/deploy_spec.rb b/spec/unit/resource/deploy_spec.rb index 0eeb51c8a0..33f16b4a89 100644 --- a/spec/unit/resource/deploy_spec.rb +++ b/spec/unit/resource/deploy_spec.rb @@ -25,7 +25,7 @@ describe Chef::Resource::Deploy do resource: Chef::Resource::Deploy, provider: Chef::Provider::Deploy::Timestamped, name: :deploy, - action: :deploy, + action: :deploy ) class << self diff --git a/spec/unit/resource/dpkg_package_spec.rb b/spec/unit/resource/dpkg_package_spec.rb index 7bfe268d7d..66ad86b861 100644 --- a/spec/unit/resource/dpkg_package_spec.rb +++ b/spec/unit/resource/dpkg_package_spec.rb @@ -26,7 +26,7 @@ describe Chef::Resource::DpkgPackage, "initialize" do provider: Chef::Provider::Package::Dpkg, name: :dpkg_package, action: :install, - os: "linux", + os: "linux" ) end diff --git a/spec/unit/resource/easy_install_package_spec.rb b/spec/unit/resource/easy_install_package_spec.rb index 9747e57f65..ce8e6d8bf6 100644 --- a/spec/unit/resource/easy_install_package_spec.rb +++ b/spec/unit/resource/easy_install_package_spec.rb @@ -25,7 +25,7 @@ describe Chef::Resource::EasyInstallPackage, "initialize" do resource: Chef::Resource::EasyInstallPackage, provider: Chef::Provider::Package::EasyInstall, name: :easy_install_package, - action: :install, + action: :install ) before(:each) do diff --git a/spec/unit/resource/gem_package_spec.rb b/spec/unit/resource/gem_package_spec.rb index de6341d0ea..a1571ab9bb 100644 --- a/spec/unit/resource/gem_package_spec.rb +++ b/spec/unit/resource/gem_package_spec.rb @@ -25,7 +25,7 @@ describe Chef::Resource::GemPackage, "initialize" do resource: Chef::Resource::GemPackage, provider: Chef::Provider::Package::Rubygems, name: :gem_package, - action: :install, + action: :install ) end diff --git a/spec/unit/resource/git_spec.rb b/spec/unit/resource/git_spec.rb index 18d6216287..15c1e54f25 100644 --- a/spec/unit/resource/git_spec.rb +++ b/spec/unit/resource/git_spec.rb @@ -25,7 +25,7 @@ describe Chef::Resource::Git do resource: Chef::Resource::Git, provider: Chef::Provider::Git, name: :git, - action: :sync, + action: :sync ) before(:each) do diff --git a/spec/unit/resource/homebrew_package_spec.rb b/spec/unit/resource/homebrew_package_spec.rb index dad9573971..cfcfcd9c3a 100644 --- a/spec/unit/resource/homebrew_package_spec.rb +++ b/spec/unit/resource/homebrew_package_spec.rb @@ -25,7 +25,7 @@ describe Chef::Resource::HomebrewPackage, "initialize" do provider: Chef::Provider::Package::Homebrew, name: :homebrew_package, action: :install, - os: "mac_os_x", + os: "mac_os_x" ) let(:resource) { Chef::Resource::HomebrewPackage.new("emacs") } diff --git a/spec/unit/resource/ips_package_spec.rb b/spec/unit/resource/ips_package_spec.rb index 62656bcf8e..fd1fe2840c 100644 --- a/spec/unit/resource/ips_package_spec.rb +++ b/spec/unit/resource/ips_package_spec.rb @@ -26,7 +26,7 @@ describe Chef::Resource::IpsPackage, "initialize" do provider: Chef::Provider::Package::Ips, name: :ips_package, action: :install, - os: "solaris2", + os: "solaris2" ) before(:each) do diff --git a/spec/unit/resource/launchd_spec.rb b/spec/unit/resource/launchd_spec.rb index 8843ec606d..95febc47cf 100644 --- a/spec/unit/resource/launchd_spec.rb +++ b/spec/unit/resource/launchd_spec.rb @@ -6,7 +6,7 @@ describe Chef::Resource::Launchd do @launchd = Chef::Resource::Launchd.new("io.chef.chef-client") let(:resource) { Chef::Resource::Launchd.new( "io.chef.chef-client", - run_context, + run_context )} it "should create a new Chef::Resource::Launchd" do diff --git a/spec/unit/resource/macports_package_spec.rb b/spec/unit/resource/macports_package_spec.rb index 1aee070fdf..62346def2d 100644 --- a/spec/unit/resource/macports_package_spec.rb +++ b/spec/unit/resource/macports_package_spec.rb @@ -26,7 +26,7 @@ describe Chef::Resource::MacportsPackage, "initialize" do provider: Chef::Provider::Package::Macports, name: :macports_package, action: :install, - os: "mac_os_x", + os: "mac_os_x" ) end diff --git a/spec/unit/resource/pacman_package_spec.rb b/spec/unit/resource/pacman_package_spec.rb index 000470b3d1..b9d2ea21f6 100644 --- a/spec/unit/resource/pacman_package_spec.rb +++ b/spec/unit/resource/pacman_package_spec.rb @@ -26,7 +26,7 @@ describe Chef::Resource::PacmanPackage, "initialize" do provider: Chef::Provider::Package::Pacman, name: :pacman_package, action: :install, - os: "linux", + os: "linux" ) end diff --git a/spec/unit/resource/rpm_package_spec.rb b/spec/unit/resource/rpm_package_spec.rb index 1a0089b4cd..e1488f1dd1 100644 --- a/spec/unit/resource/rpm_package_spec.rb +++ b/spec/unit/resource/rpm_package_spec.rb @@ -27,7 +27,7 @@ describe Chef::Resource::RpmPackage, "initialize" do provider: Chef::Provider::Package::Rpm, name: :rpm_package, action: :install, - os: os, + os: os ) end diff --git a/spec/unit/resource/smartos_package_spec.rb b/spec/unit/resource/smartos_package_spec.rb index 8b1fb2e150..56c0fbdb8b 100644 --- a/spec/unit/resource/smartos_package_spec.rb +++ b/spec/unit/resource/smartos_package_spec.rb @@ -27,7 +27,7 @@ describe Chef::Resource::SmartosPackage, "initialize" do name: :smartos_package, action: :install, os: "solaris2", - platform_family: "smartos", + platform_family: "smartos" ) end diff --git a/spec/unit/resource/solaris_package_spec.rb b/spec/unit/resource/solaris_package_spec.rb index 80d84c1bf5..1f1ef4da30 100644 --- a/spec/unit/resource/solaris_package_spec.rb +++ b/spec/unit/resource/solaris_package_spec.rb @@ -28,7 +28,7 @@ describe Chef::Resource::SolarisPackage, "initialize" do name: :solaris_package, action: :install, os: "solaris2", - platform_family: platform_family, + platform_family: platform_family ) end diff --git a/spec/unit/resource/subversion_spec.rb b/spec/unit/resource/subversion_spec.rb index 47b8ddfdeb..a2901bf53b 100644 --- a/spec/unit/resource/subversion_spec.rb +++ b/spec/unit/resource/subversion_spec.rb @@ -25,7 +25,7 @@ describe Chef::Resource::Subversion do resource: Chef::Resource::Subversion, provider: Chef::Provider::Subversion, name: :subversion, - action: :install, + action: :install ) before do diff --git a/spec/unit/resource/timestamped_deploy_spec.rb b/spec/unit/resource/timestamped_deploy_spec.rb index ad7ebe7a2e..5a2dc8ae02 100644 --- a/spec/unit/resource/timestamped_deploy_spec.rb +++ b/spec/unit/resource/timestamped_deploy_spec.rb @@ -26,7 +26,7 @@ describe Chef::Resource::TimestampedDeploy, "initialize" do name: :timestamped_deploy, action: :deploy, os: "linux", - platform_family: "rhel", + platform_family: "rhel" ) end diff --git a/spec/unit/resource/windows_package_spec.rb b/spec/unit/resource/windows_package_spec.rb index 05c40bfa93..5aa3707199 100644 --- a/spec/unit/resource/windows_package_spec.rb +++ b/spec/unit/resource/windows_package_spec.rb @@ -28,7 +28,7 @@ describe Chef::Resource::WindowsPackage, "initialize" do provider: Chef::Provider::Package::Windows, os: "windows", name: :windows_package, - action: :start, + action: :start ) let(:resource) { Chef::Resource::WindowsPackage.new("solitaire.msi") } diff --git a/spec/unit/resource/windows_service_spec.rb b/spec/unit/resource/windows_service_spec.rb index bb4b91b624..2455a70f02 100644 --- a/spec/unit/resource/windows_service_spec.rb +++ b/spec/unit/resource/windows_service_spec.rb @@ -24,7 +24,7 @@ describe Chef::Resource::WindowsService, "initialize" do provider: Chef::Provider::Service::Windows, os: "windows", name: :windows_service, - action: :start, + action: :start ) let(:resource) { Chef::Resource::WindowsService.new("BITS") } diff --git a/spec/unit/resource/yum_package_spec.rb b/spec/unit/resource/yum_package_spec.rb index 195f8c56e8..dd0d3ae928 100644 --- a/spec/unit/resource/yum_package_spec.rb +++ b/spec/unit/resource/yum_package_spec.rb @@ -27,7 +27,7 @@ describe Chef::Resource::YumPackage, "initialize" do name: :yum_package, action: :install, os: "linux", - platform_family: "rhel", + platform_family: "rhel" ) end diff --git a/spec/unit/resource_reporter_spec.rb b/spec/unit/resource_reporter_spec.rb index 30b5717f4e..0df3a165bd 100644 --- a/spec/unit/resource_reporter_spec.rb +++ b/spec/unit/resource_reporter_spec.rb @@ -699,7 +699,7 @@ describe Chef::ResourceReporter do expect(method).to eq(:POST) expect(headers).to eq({ "Content-Encoding" => "gzip", "X-Ops-Reporting-Protocol-Version" => Chef::ResourceReporter::PROTOCOL_VERSION, - },) + }) data_stream = Zlib::GzipReader.new(StringIO.new(data)) data = data_stream.read expect(data).to eq(Chef::JSONCompat.to_json(@expected_data)) diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb index 1c3a825ea1..09edbd7869 100644 --- a/spec/unit/resource_spec.rb +++ b/spec/unit/resource_spec.rb @@ -820,7 +820,7 @@ describe Chef::Resource do runner = Chef::Runner.new(run_context) Chef::Platform.set( :resource => :cat, - :provider => Chef::Provider::SnakeOil, + :provider => Chef::Provider::SnakeOil ) resource1.only_if { snitch_var1 = 1 } diff --git a/spec/unit/run_context_spec.rb b/spec/unit/run_context_spec.rb index f78f63f494..7b2a27e9f6 100644 --- a/spec/unit/run_context_spec.rb +++ b/spec/unit/run_context_spec.rb @@ -83,7 +83,7 @@ describe Chef::RunContext do "test-with-deps" => { "version" => "0.0.0", }, - }, + } ) end diff --git a/spec/unit/runner_spec.rb b/spec/unit/runner_spec.rb index 300d51229b..f15f3951e0 100644 --- a/spec/unit/runner_spec.rb +++ b/spec/unit/runner_spec.rb @@ -104,7 +104,7 @@ describe Chef::Runner do # set up old Chef::Platform resolution instead of provider_resolver Chef::Platform.set( :resource => :cat, - :provider => Chef::Provider::SnakeOil, + :provider => Chef::Provider::SnakeOil ) allow(Chef::ProviderResolver).to receive(:new).and_return(provider_resolver) allow(provider_resolver).to receive(:maybe_dynamic_provider_resolution).with(first_resource, anything()).and_return(nil) diff --git a/spec/unit/windows_service_spec.rb b/spec/unit/windows_service_spec.rb index 3f9419bb99..3555b70f1b 100644 --- a/spec/unit/windows_service_spec.rb +++ b/spec/unit/windows_service_spec.rb @@ -52,7 +52,7 @@ describe "Chef::Application::WindowsService", :windows_only do it "passes DEFAULT_LOG_LOCATION to chef-client instead of STDOUT" do expect(subject).to receive(:shell_out).with( "chef-client.bat --no-fork -c test_config_file -L #{Chef::Application::WindowsService::DEFAULT_LOG_LOCATION}", - shellout_options, + shellout_options ).and_return(shell_out_result) subject.service_main end @@ -74,7 +74,7 @@ describe "Chef::Application::WindowsService", :windows_only do it "uses the configured log location" do expect(subject).to receive(:shell_out).with( "chef-client.bat --no-fork -c test_config_file -L #{tempfile.path}", - shellout_options, + shellout_options ).and_return(shell_out_result) subject.service_main end @@ -91,7 +91,7 @@ describe "Chef::Application::WindowsService", :windows_only do it "does not pass log location to new process" do expect(subject).to receive(:shell_out).with( "chef-client.bat --no-fork -c test_config_file", - shellout_options, + shellout_options ).and_return(shell_out_result) subject.service_main end @@ -108,7 +108,7 @@ describe "Chef::Application::WindowsService", :windows_only do it "passes watchdog timeout to new process" do expect(subject).to receive(:shell_out).with( "chef-client.bat --no-fork -c test_config_file -L #{Chef::Application::WindowsService::DEFAULT_LOG_LOCATION}", - shellout_options, + shellout_options ).and_return(shell_out_result) subject.service_main end |