diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 10:03:50 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 10:04:23 -0700 |
commit | 90a74a80196725c4198b6042e8485d68c70777ac (patch) | |
tree | cddd1db0afd12a306300735538a952eff5912224 /spec/functional/resource | |
parent | 476d2367f8b60e653289c048df6d1f4042b0753b (diff) | |
download | chef-90a74a80196725c4198b6042e8485d68c70777ac.tar.gz |
fixes for chefstyle bump
result of automation
https://github.com/chef/chefstyle/pull/72
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/functional/resource')
-rw-r--r-- | spec/functional/resource/chocolatey_package_spec.rb | 2 | ||||
-rw-r--r-- | spec/functional/resource/dpkg_package_spec.rb | 8 | ||||
-rw-r--r-- | spec/functional/resource/dsc_script_spec.rb | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/spec/functional/resource/chocolatey_package_spec.rb b/spec/functional/resource/chocolatey_package_spec.rb index e8dae581b9..3c4b08a1f4 100644 --- a/spec/functional/resource/chocolatey_package_spec.rb +++ b/spec/functional/resource/chocolatey_package_spec.rb @@ -63,7 +63,7 @@ describe Chef::Resource::ChocolateyPackage, :windows_only, :choco_installed do end context "installing multiple packages" do - let(:package_name) { [ "test-A", "test-B" ] } + let(:package_name) { %w{test-A test-B} } it "installs both packages" do subject.run_action(:install) diff --git a/spec/functional/resource/dpkg_package_spec.rb b/spec/functional/resource/dpkg_package_spec.rb index 1988fd0c7d..ef4a52017f 100644 --- a/spec/functional/resource/dpkg_package_spec.rb +++ b/spec/functional/resource/dpkg_package_spec.rb @@ -273,7 +273,7 @@ describe Chef::Resource::DpkgPackage, :requires_root, :debian_family_only, arch: it "should remove both packages when called with two" do shell_out!("dpkg -i #{test1_0} #{test2_0}") - set_dpkg_package_name [ "chef-integration-test", "chef-integration-test2" ] + set_dpkg_package_name %w{chef-integration-test chef-integration-test2} dpkg_package.run_action(action) expect(dpkg_package).to be_updated_by_last_action should_be_purged_or_removed("chef-integration-test") @@ -282,7 +282,7 @@ describe Chef::Resource::DpkgPackage, :requires_root, :debian_family_only, arch: it "should remove a package when only the first one is installed" do shell_out!("dpkg -i #{test1_0}") - set_dpkg_package_name [ "chef-integration-test", "chef-integration-test2" ] + set_dpkg_package_name %w{chef-integration-test chef-integration-test2} dpkg_package.run_action(action) expect(dpkg_package).to be_updated_by_last_action should_be_purged_or_removed("chef-integration-test") @@ -291,7 +291,7 @@ describe Chef::Resource::DpkgPackage, :requires_root, :debian_family_only, arch: it "should remove a package when only the second one is installed" do shell_out!("dpkg -i #{test2_0}") - set_dpkg_package_name [ "chef-integration-test", "chef-integration-test2" ] + set_dpkg_package_name %w{chef-integration-test chef-integration-test2} dpkg_package.run_action(action) expect(dpkg_package).to be_updated_by_last_action should_be_purged_or_removed("chef-integration-test") @@ -299,7 +299,7 @@ describe Chef::Resource::DpkgPackage, :requires_root, :debian_family_only, arch: end it "should do nothing when both packages are not installed" do - set_dpkg_package_name [ "chef-integration-test", "chef-integration-test2" ] + set_dpkg_package_name %w{chef-integration-test chef-integration-test2} dpkg_package.run_action(action) expect(dpkg_package).not_to be_updated_by_last_action should_be_purged_or_removed("chef-integration-test") diff --git a/spec/functional/resource/dsc_script_spec.rb b/spec/functional/resource/dsc_script_spec.rb index 37b70598df..0808927000 100644 --- a/spec/functional/resource/dsc_script_spec.rb +++ b/spec/functional/resource/dsc_script_spec.rb @@ -310,7 +310,7 @@ describe Chef::Resource::DscScript, :windows_powershell_dsc_only do it "should set a registry key according to parameters passed to the configuration" do dsc_test_resource.configuration_name(config_name_value) - dsc_test_resource.flags({ :"#{reg_key_name_param_name}" => test_registry_key, :"#{reg_key_value_param_name}" => test_registry_value }) + dsc_test_resource.flags({ "#{reg_key_name_param_name}": test_registry_key, "#{reg_key_value_param_name}": test_registry_value }) expect(dsc_test_resource.registry_key_exists?(test_registry_key)).to eq(false) dsc_test_resource.run_action(:run) expect(dsc_test_resource.registry_key_exists?(test_registry_key)).to eq(true) @@ -347,7 +347,7 @@ describe Chef::Resource::DscScript, :windows_powershell_dsc_only do shared_examples_for "a dsc_script with configuration data that takes parameters" do let(:dsc_user_code) { dsc_user_param_code } let(:config_param_section) { config_params } - let(:config_flags) { { :"#{dsc_user_prefix_param_name}" => (dsc_user_prefix).to_s, :"#{dsc_user_suffix_param_name}" => (dsc_user_suffix).to_s } } + let(:config_flags) { { "#{dsc_user_prefix_param_name}": (dsc_user_prefix).to_s, "#{dsc_user_suffix_param_name}": (dsc_user_suffix).to_s } } it "does not directly contain the user name" do configuration_script_content = ::File.open(dsc_test_resource.command) do |file| file.read |