diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:33:43 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:33:43 -0700 |
commit | f2232a71362244747949efe9ac30a7bb410626e4 (patch) | |
tree | 4671859d0fcdc385f161c087508f6bef088a1657 /spec | |
parent | 0bdd618fc5146dad3fa5a90d10a4b5e608e4663d (diff) | |
download | chef-f2232a71362244747949efe9ac30a7bb410626e4.tar.gz |
fix some Style/StringLiterals introduced by the UnneededInterpolation
cop
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/provider/package/cab_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/unit/provider/package/cab_spec.rb b/spec/unit/provider/package/cab_spec.rb index 619240de23..2ed40566f4 100644 --- a/spec/unit/provider/package/cab_spec.rb +++ b/spec/unit/provider/package/cab_spec.rb @@ -49,7 +49,7 @@ describe Chef::Provider::Package::Cab do end before do - new_resource.source = File.join((ENV['TEMP']).to_s, "test6.1-kb2664825-v3-x64.cab") + new_resource.source = File.join((ENV["TEMP"]).to_s, "test6.1-kb2664825-v3-x64.cab") installed_package_list_obj = double(stdout: installed_package_list_stdout) allow(provider).to receive(:dism_command).with("/Get-Packages").and_return(installed_package_list_obj) package_version_obj = double(stdout: package_version_stdout) @@ -151,9 +151,9 @@ describe Chef::Provider::Package::Cab do allow(Chef::FileCache).to receive(:create_cache_path).and_return(ENV["TEMP"]) path = provider.default_download_cache_path if windows? - expect(path).to be == File.join((ENV['TEMP']).to_s, "\\", "Test6.1-KB2664825-v3-x64.cab") + expect(path).to be == File.join((ENV["TEMP"]).to_s, "\\", "Test6.1-KB2664825-v3-x64.cab") else - expect(path).to be == File.join((ENV['TEMP']).to_s, "Test6.1-KB2664825-v3-x64.cab") + expect(path).to be == File.join((ENV["TEMP"]).to_s, "Test6.1-KB2664825-v3-x64.cab") end end end @@ -161,12 +161,12 @@ describe Chef::Provider::Package::Cab do describe "#cab_file_source" do context "when local file path is set" do it "returns local cab file source path" do - new_resource.source = File.join((ENV['TEMP']).to_s, "test6.1-kb2664825-v3-x64.cab") + new_resource.source = File.join((ENV["TEMP"]).to_s, "test6.1-kb2664825-v3-x64.cab") path = provider.cab_file_source if windows? - expect(path).to be == File.join((ENV['TEMP'].downcase).to_s, "\\", "test6.1-kb2664825-v3-x64.cab") + expect(path).to be == File.join((ENV["TEMP"].downcase).to_s, "\\", "test6.1-kb2664825-v3-x64.cab") else - expect(path).to be == File.join((ENV['TEMP']).to_s, "test6.1-kb2664825-v3-x64.cab") + expect(path).to be == File.join((ENV["TEMP"]).to_s, "test6.1-kb2664825-v3-x64.cab") end end end @@ -174,9 +174,9 @@ describe Chef::Provider::Package::Cab do it "calls download_source_file method" do new_resource.source = "https://www.something.com/test6.1-kb2664825-v3-x64.cab" if windows? - expect(provider).to receive(:download_source_file).and_return(File.join((ENV['TEMP'].downcase).to_s, "\\", "test6.1-kb2664825-v3-x64.cab")) + expect(provider).to receive(:download_source_file).and_return(File.join((ENV["TEMP"].downcase).to_s, "\\", "test6.1-kb2664825-v3-x64.cab")) else - expect(provider).to receive(:download_source_file).and_return(File.join((ENV['TEMP']).to_s, "test6.1-kb2664825-v3-x64.cab")) + expect(provider).to receive(:download_source_file).and_return(File.join((ENV["TEMP"]).to_s, "test6.1-kb2664825-v3-x64.cab")) end provider.cab_file_source end |