diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-05 12:58:00 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-05 12:58:00 -0700 |
commit | 2a4916b7f01940d1199c35645c1b2172f5bd74b2 (patch) | |
tree | df7370ed682895857181f14bb66cad8db18b298e /spec/support | |
parent | 8215091264d67d81f0da9a13f968b864ff736cb2 (diff) | |
download | chef-2a4916b7f01940d1199c35645c1b2172f5bd74b2.tar.gz |
Style/StringLiteralsInInterpolation
since we use double quotes, be consistent everywhere.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/support')
5 files changed, 7 insertions, 7 deletions
diff --git a/spec/support/platforms/win32/spec_service.rb b/spec/support/platforms/win32/spec_service.rb index 7398cfbd96..2cc4e40298 100644 --- a/spec/support/platforms/win32/spec_service.rb +++ b/spec/support/platforms/win32/spec_service.rb @@ -20,7 +20,7 @@ require "win32/daemon" class SpecService < ::Win32::Daemon def service_init - @test_service_file = "#{ENV['TMP']}/spec_service_file" + @test_service_file = "#{ENV["TMP"]}/spec_service_file" end def service_main(*startup_parameters) diff --git a/spec/support/shared/functional/execute_resource.rb b/spec/support/shared/functional/execute_resource.rb index e5639f1614..f56479bb49 100644 --- a/spec/support/shared/functional/execute_resource.rb +++ b/spec/support/shared/functional/execute_resource.rb @@ -21,7 +21,7 @@ shared_context "a non-admin Windows user" do let(:windows_nonadmin_user_domain) { ENV["COMPUTERNAME"] } let(:windows_nonadmin_user_qualified) { "#{windows_nonadmin_user_domain}\\#{windows_nonadmin_user}" } - let(:temp_profile_path) { "#{ENV['USERPROFILE']}\\..\\cheftesttempuser" } + let(:temp_profile_path) { "#{ENV["USERPROFILE"]}\\..\\cheftesttempuser" } before do shell_out!("net.exe user /delete #{windows_nonadmin_user}", returns: [0, 2]) @@ -40,7 +40,7 @@ end shared_context "alternate user identity" do let(:windows_alternate_user) { "chef%02d%02d%02d" % [Time.now.year % 100, Time.now.month, Time.now.day] } let(:windows_alternate_user_password) { "lj28;fx3T!x,2" } - let(:windows_alternate_user_qualified) { "#{ENV['COMPUTERNAME']}\\#{windows_alternate_user}" } + let(:windows_alternate_user_qualified) { "#{ENV["COMPUTERNAME"]}\\#{windows_alternate_user}" } let(:windows_nonadmin_user) { windows_alternate_user } let(:windows_nonadmin_user_password) { windows_alternate_user_password } @@ -73,7 +73,7 @@ shared_examples_for "an execute resource that supports alternate user identity" include_context "a command that can be executed as an alternate user" let(:windows_current_user) { ENV["USERNAME"] } - let(:windows_current_user_qualified) { "#{ENV['USERDOMAIN'] || ENV['COMPUTERNAME']}\\#{windows_current_user}" } + let(:windows_current_user_qualified) { "#{ENV["USERDOMAIN"] || ENV["COMPUTERNAME"]}\\#{windows_current_user}" } let(:resource_identity_command) { "powershell.exe -noprofile -command \"import-module microsoft.powershell.utility;([Security.Principal.WindowsPrincipal]([Security.Principal.WindowsIdentity]::GetCurrent())).identity.name | out-file -encoding ASCII '#{script_output_path}'\"" } let(:execute_resource) do diff --git a/spec/support/shared/functional/securable_resource.rb b/spec/support/shared/functional/securable_resource.rb index 18e7243453..6705c8e2d8 100644 --- a/spec/support/shared/functional/securable_resource.rb +++ b/spec/support/shared/functional/securable_resource.rb @@ -314,7 +314,7 @@ shared_examples_for "a securable resource without existing target" do end it "sets owner when owner is specified with a \\" do - resource.owner "#{ENV['COMPUTERNAME']}\\Guest" + resource.owner "#{ENV["COMPUTERNAME"]}\\Guest" resource.run_action(:create) expect(descriptor.owner).to eq(SID.Guest) end diff --git a/spec/support/shared/functional/win32_service.rb b/spec/support/shared/functional/win32_service.rb index a528db4a53..2d14c6cf86 100644 --- a/spec/support/shared/functional/win32_service.rb +++ b/spec/support/shared/functional/win32_service.rb @@ -52,6 +52,6 @@ shared_context "using Win32::Service" do # for the file it creates under SYSTEM temp directory let(:test_service_file) do - "#{ENV['SystemDrive']}\\windows\\temp\\spec_service_file" + "#{ENV["SystemDrive"]}\\windows\\temp\\spec_service_file" end end diff --git a/spec/support/shared/integration/knife_support.rb b/spec/support/shared/integration/knife_support.rb index 56933537f0..07d95f17cc 100644 --- a/spec/support/shared/integration/knife_support.rb +++ b/spec/support/shared/integration/knife_support.rb @@ -58,7 +58,7 @@ module KnifeSupport old_loggers = Chef::Log.loggers old_log_level = Chef::Log.level begin - puts "knife: #{args.join(' ')}" if DEBUG + puts "knife: #{args.join(" ")}" if DEBUG subcommand_class = Chef::Knife.subcommand_class_from(args) subcommand_class.options = Chef::Application::Knife.options.merge(subcommand_class.options) subcommand_class.load_deps |