summaryrefslogtreecommitdiff
path: root/spec/unit/resource
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-14 14:08:03 +0000
committerThom May <thom@chef.io>2016-01-14 14:08:03 +0000
commit51cfbdc4d16739caac4d946fadbe678444aafe34 (patch)
tree56dfd8f1cd9fd933de27268b32402e955a43ac2b /spec/unit/resource
parent05064423057d4cf46f4713b81b08829cf6d20af6 (diff)
downloadchef-51cfbdc4d16739caac4d946fadbe678444aafe34.tar.gz
Use double quotes by default
This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
Diffstat (limited to 'spec/unit/resource')
-rw-r--r--spec/unit/resource/apt_package_spec.rb4
-rw-r--r--spec/unit/resource/bash_spec.rb2
-rw-r--r--spec/unit/resource/batch_spec.rb6
-rw-r--r--spec/unit/resource/breakpoint_spec.rb4
-rw-r--r--spec/unit/resource/chef_gem_spec.rb4
-rw-r--r--spec/unit/resource/chocolatey_package_spec.rb2
-rw-r--r--spec/unit/resource/conditional_action_not_nothing_spec.rb2
-rw-r--r--spec/unit/resource/conditional_spec.rb16
-rw-r--r--spec/unit/resource/cookbook_file_spec.rb12
-rw-r--r--spec/unit/resource/cron_spec.rb2
-rw-r--r--spec/unit/resource/csh_spec.rb2
-rw-r--r--spec/unit/resource/deploy_revision_spec.rb4
-rw-r--r--spec/unit/resource/deploy_spec.rb4
-rw-r--r--spec/unit/resource/directory_spec.rb2
-rw-r--r--spec/unit/resource/dpkg_package_spec.rb6
-rw-r--r--spec/unit/resource/dsc_resource_spec.rb14
-rw-r--r--spec/unit/resource/dsc_script_spec.rb22
-rw-r--r--spec/unit/resource/easy_install_package_spec.rb4
-rw-r--r--spec/unit/resource/env_spec.rb2
-rw-r--r--spec/unit/resource/erl_call_spec.rb2
-rw-r--r--spec/unit/resource/execute_spec.rb2
-rw-r--r--spec/unit/resource/file/verification_spec.rb10
-rw-r--r--spec/unit/resource/file_spec.rb2
-rw-r--r--spec/unit/resource/freebsd_package_spec.rb6
-rw-r--r--spec/unit/resource/gem_package_spec.rb4
-rw-r--r--spec/unit/resource/git_spec.rb4
-rw-r--r--spec/unit/resource/group_spec.rb2
-rw-r--r--spec/unit/resource/homebrew_package_spec.rb22
-rw-r--r--spec/unit/resource/http_request_spec.rb2
-rw-r--r--spec/unit/resource/ifconfig_spec.rb14
-rw-r--r--spec/unit/resource/ips_package_spec.rb4
-rw-r--r--spec/unit/resource/ksh_spec.rb2
-rw-r--r--spec/unit/resource/link_spec.rb2
-rw-r--r--spec/unit/resource/log_spec.rb2
-rw-r--r--spec/unit/resource/macports_package_spec.rb4
-rw-r--r--spec/unit/resource/mdadm_spec.rb2
-rw-r--r--spec/unit/resource/mount_spec.rb4
-rw-r--r--spec/unit/resource/ohai_spec.rb2
-rw-r--r--spec/unit/resource/openbsd_package_spec.rb4
-rw-r--r--spec/unit/resource/osx_profile_spec.rb4
-rw-r--r--spec/unit/resource/package_spec.rb2
-rw-r--r--spec/unit/resource/pacman_package_spec.rb4
-rw-r--r--spec/unit/resource/perl_spec.rb2
-rw-r--r--spec/unit/resource/powershell_script_spec.rb14
-rw-r--r--spec/unit/resource/python_spec.rb2
-rw-r--r--spec/unit/resource/registry_key_spec.rb34
-rw-r--r--spec/unit/resource/remote_directory_spec.rb2
-rw-r--r--spec/unit/resource/remote_file_spec.rb8
-rw-r--r--spec/unit/resource/resource_notification_spec.rb4
-rw-r--r--spec/unit/resource/route_spec.rb2
-rw-r--r--spec/unit/resource/rpm_package_spec.rb4
-rw-r--r--spec/unit/resource/ruby_block_spec.rb2
-rw-r--r--spec/unit/resource/ruby_spec.rb2
-rw-r--r--spec/unit/resource/scm_spec.rb4
-rw-r--r--spec/unit/resource/script_spec.rb2
-rw-r--r--spec/unit/resource/service_spec.rb2
-rw-r--r--spec/unit/resource/smartos_package_spec.rb4
-rw-r--r--spec/unit/resource/solaris_package_spec.rb4
-rw-r--r--spec/unit/resource/subversion_spec.rb8
-rw-r--r--spec/unit/resource/template_spec.rb2
-rw-r--r--spec/unit/resource/timestamped_deploy_spec.rb6
-rw-r--r--spec/unit/resource/user_spec.rb2
-rw-r--r--spec/unit/resource/windows_package_spec.rb10
-rw-r--r--spec/unit/resource/windows_service_spec.rb2
-rw-r--r--spec/unit/resource/yum_package_spec.rb8
65 files changed, 175 insertions, 175 deletions
diff --git a/spec/unit/resource/apt_package_spec.rb b/spec/unit/resource/apt_package_spec.rb
index 3c31f63dd7..cf425519b5 100644
--- a/spec/unit/resource/apt_package_spec.rb
+++ b/spec/unit/resource/apt_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::AptPackage, "initialize" do
diff --git a/spec/unit/resource/bash_spec.rb b/spec/unit/resource/bash_spec.rb
index f313900433..71805a44a2 100644
--- a/spec/unit/resource/bash_spec.rb
+++ b/spec/unit/resource/bash_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Bash do
diff --git a/spec/unit/resource/batch_spec.rb b/spec/unit/resource/batch_spec.rb
index b8c2897f42..965e48d9fa 100644
--- a/spec/unit/resource/batch_spec.rb
+++ b/spec/unit/resource/batch_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Batch do
@@ -25,7 +25,7 @@ describe Chef::Resource::Batch do
node.default["kernel"] = Hash.new
node.default["kernel"][:machine] = :x86_64.to_s
- node.automatic[:os] = 'windows'
+ node.automatic[:os] = "windows"
run_context = Chef::RunContext.new(node, nil, nil)
@@ -41,7 +41,7 @@ describe Chef::Resource::Batch do
let(:resource_instance) { @resource }
let(:resource_instance_name ) { @resource.command }
let(:resource_name) { :batch }
- let(:interpreter_file_name) { 'cmd.exe' }
+ let(:interpreter_file_name) { "cmd.exe" }
it_should_behave_like "a Windows script resource"
end
diff --git a/spec/unit/resource/breakpoint_spec.rb b/spec/unit/resource/breakpoint_spec.rb
index 88ab34d568..63a1753a2f 100644
--- a/spec/unit/resource/breakpoint_spec.rb
+++ b/spec/unit/resource/breakpoint_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::Breakpoint do
diff --git a/spec/unit/resource/chef_gem_spec.rb b/spec/unit/resource/chef_gem_spec.rb
index df37779d1b..3e6002e4f2 100644
--- a/spec/unit/resource/chef_gem_spec.rb
+++ b/spec/unit/resource/chef_gem_spec.rb
@@ -17,8 +17,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::ChefGem, "initialize" do
diff --git a/spec/unit/resource/chocolatey_package_spec.rb b/spec/unit/resource/chocolatey_package_spec.rb
index 38f1d2905c..b125279909 100644
--- a/spec/unit/resource/chocolatey_package_spec.rb
+++ b/spec/unit/resource/chocolatey_package_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::ChocolateyPackage do
diff --git a/spec/unit/resource/conditional_action_not_nothing_spec.rb b/spec/unit/resource/conditional_action_not_nothing_spec.rb
index d140615cfc..bc22ae7a47 100644
--- a/spec/unit/resource/conditional_action_not_nothing_spec.rb
+++ b/spec/unit/resource/conditional_action_not_nothing_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::ConditionalActionNotNothing do
diff --git a/spec/unit/resource/conditional_spec.rb b/spec/unit/resource/conditional_spec.rb
index 489c1136b1..7d153df24a 100644
--- a/spec/unit/resource/conditional_spec.rb
+++ b/spec/unit/resource/conditional_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'ostruct'
+require "spec_helper"
+require "ostruct"
describe Chef::Resource::Conditional do
before do
@@ -89,17 +89,17 @@ describe Chef::Resource::Conditional do
end
end
- describe 'after running a command which timed out' do
+ describe "after running a command which timed out" do
before do
@conditional = Chef::Resource::Conditional.only_if(@parent_resource, "false")
allow_any_instance_of(Chef::GuardInterpreter::DefaultGuardInterpreter).to receive(:shell_out).and_raise(Chef::Exceptions::CommandTimeout)
end
- it 'indicates that resource convergence should not continue' do
+ it "indicates that resource convergence should not continue" do
expect(@conditional.continue?).to be_falsey
end
- it 'should log a warning' do
+ it "should log a warning" do
expect(Chef::Log).to receive(:warn).with("Command 'false' timed out")
@conditional.continue?
end
@@ -169,17 +169,17 @@ describe Chef::Resource::Conditional do
end
end
- describe 'after running a command which timed out' do
+ describe "after running a command which timed out" do
before do
@conditional = Chef::Resource::Conditional.not_if(@parent_resource, "false")
allow_any_instance_of(Chef::GuardInterpreter::DefaultGuardInterpreter).to receive(:shell_out).and_raise(Chef::Exceptions::CommandTimeout)
end
- it 'indicates that resource convergence should continue' do
+ it "indicates that resource convergence should continue" do
expect(@conditional.continue?).to be_truthy
end
- it 'should log a warning' do
+ it "should log a warning" do
expect(Chef::Log).to receive(:warn).with("Command 'false' timed out")
@conditional.continue?
end
diff --git a/spec/unit/resource/cookbook_file_spec.rb b/spec/unit/resource/cookbook_file_spec.rb
index bd437893ce..442e175f63 100644
--- a/spec/unit/resource/cookbook_file_spec.rb
+++ b/spec/unit/resource/cookbook_file_spec.rb
@@ -17,20 +17,20 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::CookbookFile do
before do
- @cookbook_file = Chef::Resource::CookbookFile.new('sourcecode_tarball.tgz')
+ @cookbook_file = Chef::Resource::CookbookFile.new("sourcecode_tarball.tgz")
end
it "uses the name parameter for the source parameter" do
- expect(@cookbook_file.name).to eq('sourcecode_tarball.tgz')
+ expect(@cookbook_file.name).to eq("sourcecode_tarball.tgz")
end
it "has a source parameter" do
- @cookbook_file.name('config_file.conf')
- expect(@cookbook_file.name).to eq('config_file.conf')
+ @cookbook_file.name("config_file.conf")
+ expect(@cookbook_file.name).to eq("config_file.conf")
end
it "defaults to a nil cookbook parameter (current cookbook will be used)" do
@@ -39,7 +39,7 @@ describe Chef::Resource::CookbookFile do
it "has a cookbook parameter" do
@cookbook_file.cookbook("munin")
- expect(@cookbook_file.cookbook).to eq('munin')
+ expect(@cookbook_file.cookbook).to eq("munin")
end
it "sets the provider to Chef::Provider::CookbookFile" do
diff --git a/spec/unit/resource/cron_spec.rb b/spec/unit/resource/cron_spec.rb
index 0978be6930..1ba48641ed 100644
--- a/spec/unit/resource/cron_spec.rb
+++ b/spec/unit/resource/cron_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Cron do
diff --git a/spec/unit/resource/csh_spec.rb b/spec/unit/resource/csh_spec.rb
index 5fb3b00507..fee96eb75e 100644
--- a/spec/unit/resource/csh_spec.rb
+++ b/spec/unit/resource/csh_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Csh do
diff --git a/spec/unit/resource/deploy_revision_spec.rb b/spec/unit/resource/deploy_revision_spec.rb
index d136aa251e..45df9c3dc2 100644
--- a/spec/unit/resource/deploy_revision_spec.rb
+++ b/spec/unit/resource/deploy_revision_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::DeployRevision do
diff --git a/spec/unit/resource/deploy_spec.rb b/spec/unit/resource/deploy_spec.rb
index 2338e37173..c53978a127 100644
--- a/spec/unit/resource/deploy_spec.rb
+++ b/spec/unit/resource/deploy_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::Deploy do
diff --git a/spec/unit/resource/directory_spec.rb b/spec/unit/resource/directory_spec.rb
index e9e80806db..a6d353ce06 100644
--- a/spec/unit/resource/directory_spec.rb
+++ b/spec/unit/resource/directory_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Directory do
diff --git a/spec/unit/resource/dpkg_package_spec.rb b/spec/unit/resource/dpkg_package_spec.rb
index 931e6763bd..4c35f0cb41 100644
--- a/spec/unit/resource/dpkg_package_spec.rb
+++ b/spec/unit/resource/dpkg_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::DpkgPackage, "initialize" do
@@ -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/dsc_resource_spec.rb b/spec/unit/resource/dsc_resource_spec.rb
index 276aa74111..4c98442d13 100644
--- a/spec/unit/resource/dsc_resource_spec.rb
+++ b/spec/unit/resource/dsc_resource_spec.rb
@@ -15,18 +15,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::DscResource do
- let(:dsc_test_resource_name) { 'DSCTest' }
+ let(:dsc_test_resource_name) { "DSCTest" }
let(:dsc_test_property_name) { :DSCTestProperty }
- let(:dsc_test_property_value) { 'DSCTestValue' }
+ let(:dsc_test_property_value) { "DSCTestValue" }
let(:dsc_test_reboot_action) { :reboot_now }
let(:dsc_test_timeout) { 101 }
- context 'when Powershell supports Dsc' do
+ context "when Powershell supports Dsc" do
let(:dsc_test_run_context) {
node = Chef::Node.new
- node.automatic[:languages][:powershell][:version] = '5.0.10018.0'
+ node.automatic[:languages][:powershell][:version] = "5.0.10018.0"
empty_events = Chef::EventDispatch::Dispatcher.new
Chef::RunContext.new(node, {}, empty_events)
}
@@ -72,7 +72,7 @@ describe Chef::Resource::DscResource do
it "raises a TypeError if property_name is not a symbol" do
expect{
- dsc_test_resource.property('Foo', dsc_test_property_value)
+ dsc_test_resource.property("Foo", dsc_test_property_value)
}.to raise_error(TypeError)
end
@@ -87,7 +87,7 @@ describe Chef::Resource::DscResource do
end
end
- context 'Powershell DSL methods' do
+ context "Powershell DSL methods" do
it "responds to :ps_credential" do
expect(dsc_test_resource.respond_to?(:ps_credential)).to be true
end
diff --git a/spec/unit/resource/dsc_script_spec.rb b/spec/unit/resource/dsc_script_spec.rb
index 1fa865a2d5..3afa46dd48 100644
--- a/spec/unit/resource/dsc_script_spec.rb
+++ b/spec/unit/resource/dsc_script_spec.rb
@@ -16,15 +16,15 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::DscScript do
- let(:dsc_test_resource_name) { 'DSCTest' }
+ let(:dsc_test_resource_name) { "DSCTest" }
- context 'when Powershell supports Dsc' do
+ context "when Powershell supports Dsc" do
let(:dsc_test_run_context) {
node = Chef::Node.new
- node.automatic[:languages][:powershell][:version] = '4.0'
+ node.automatic[:languages][:powershell][:version] = "4.0"
empty_events = Chef::EventDispatch::Dispatcher.new
Chef::RunContext.new(node, {}, empty_events)
}
@@ -32,10 +32,10 @@ describe Chef::Resource::DscScript do
Chef::Resource::DscScript.new(dsc_test_resource_name, dsc_test_run_context)
}
let(:configuration_code) {'echo "This is supposed to create a configuration document."'}
- let(:configuration_path) {'c:/myconfigs/formatc.ps1'}
- let(:configuration_name) { 'formatme' }
+ let(:configuration_path) {"c:/myconfigs/formatc.ps1"}
+ let(:configuration_name) { "formatme" }
let(:configuration_data) { '@{AllNodes = @( @{ NodeName = "localhost"; PSDscAllowPlainTextPassword = $true })}' }
- let(:configuration_data_script) { 'c:/myconfigs/data/safedata.psd1' }
+ let(:configuration_data_script) { "c:/myconfigs/data/safedata.psd1" }
it "has a default action of `:run`" do
expect(dsc_test_resource.action).to eq([:run])
@@ -75,9 +75,9 @@ describe Chef::Resource::DscScript do
end
context "when calling imports" do
- let(:module_name) { 'FooModule' }
- let(:module_name_b) { 'BarModule' }
- let(:dsc_resources) { ['ResourceA', 'ResourceB'] }
+ let(:module_name) { "FooModule" }
+ let(:module_name_b) { "BarModule" }
+ let(:dsc_resources) { ["ResourceA", "ResourceB"] }
it "allows an arbitrary number of resources to be set for a module to be set" do
dsc_test_resource.imports module_name, *dsc_resources
@@ -88,7 +88,7 @@ describe Chef::Resource::DscScript do
it "adds * to the imports when no resources are set for a moudle" do
dsc_test_resource.imports module_name
module_imports = dsc_test_resource.imports[module_name]
- expect(module_imports).to eq(['*'])
+ expect(module_imports).to eq(["*"])
end
it "allows an arbitrary number of modules" do
diff --git a/spec/unit/resource/easy_install_package_spec.rb b/spec/unit/resource/easy_install_package_spec.rb
index c68b026b39..52e0e91994 100644
--- a/spec/unit/resource/easy_install_package_spec.rb
+++ b/spec/unit/resource/easy_install_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::EasyInstallPackage, "initialize" do
diff --git a/spec/unit/resource/env_spec.rb b/spec/unit/resource/env_spec.rb
index 60e85ac31e..8a10ca7e81 100644
--- a/spec/unit/resource/env_spec.rb
+++ b/spec/unit/resource/env_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Env do
diff --git a/spec/unit/resource/erl_call_spec.rb b/spec/unit/resource/erl_call_spec.rb
index 9abf2e7812..7cdb5bda16 100644
--- a/spec/unit/resource/erl_call_spec.rb
+++ b/spec/unit/resource/erl_call_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::ErlCall do
diff --git a/spec/unit/resource/execute_spec.rb b/spec/unit/resource/execute_spec.rb
index 09160ddbd0..493508f08b 100644
--- a/spec/unit/resource/execute_spec.rb
+++ b/spec/unit/resource/execute_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Execute do
let(:resource_instance_name) { "some command" }
diff --git a/spec/unit/resource/file/verification_spec.rb b/spec/unit/resource/file/verification_spec.rb
index 6b929789c8..30956c04ba 100644
--- a/spec/unit/resource/file/verification_spec.rb
+++ b/spec/unit/resource/file/verification_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::File::Verification do
let(:t_block) { Proc.new { true } }
@@ -82,27 +82,27 @@ describe Chef::Resource::File::Verification do
end
it "substitutes \%{file} with the path" do
- test_command = platform_specific_verify_command('file')
+ test_command = platform_specific_verify_command("file")
v = Chef::Resource::File::Verification.new(parent_resource, test_command, {})
expect(v.verify(temp_path)).to eq(true)
end
it "warns about deprecation when \%{file} is used" do
expect(Chef::Log).to receive(:deprecation).with(/%{file} is deprecated/, /verification_spec\.rb/)
- test_command = platform_specific_verify_command('file')
+ test_command = platform_specific_verify_command("file")
Chef::Resource::File::Verification.new(parent_resource, test_command, {})
.verify(temp_path)
end
it "does not warn about deprecation when \%{file} is not used" do
expect(Chef::Log).to_not receive(:deprecation)
- test_command = platform_specific_verify_command('path')
+ test_command = platform_specific_verify_command("path")
Chef::Resource::File::Verification.new(parent_resource, test_command, {})
.verify(temp_path)
end
it "substitutes \%{path} with the path" do
- test_command = platform_specific_verify_command('path')
+ test_command = platform_specific_verify_command("path")
v = Chef::Resource::File::Verification.new(parent_resource, test_command, {})
expect(v.verify(temp_path)).to eq(true)
end
diff --git a/spec/unit/resource/file_spec.rb b/spec/unit/resource/file_spec.rb
index 76beaf15e1..3dec8145a4 100644
--- a/spec/unit/resource/file_spec.rb
+++ b/spec/unit/resource/file_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::File do
diff --git a/spec/unit/resource/freebsd_package_spec.rb b/spec/unit/resource/freebsd_package_spec.rb
index 7263d3a7ba..5c9c613771 100644
--- a/spec/unit/resource/freebsd_package_spec.rb
+++ b/spec/unit/resource/freebsd_package_spec.rb
@@ -18,8 +18,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'ostruct'
+require "spec_helper"
+require "ostruct"
describe Chef::Resource::FreebsdPackage do
before(:each) do
@@ -48,7 +48,7 @@ describe Chef::Resource::FreebsdPackage do
describe "Assigning provider after creation" do
describe "if ports specified as source" do
it "should be Freebsd::Port" do
- @resource.source('ports')
+ @resource.source("ports")
@resource.after_created
expect(@resource.provider).to eq(Chef::Provider::Package::Freebsd::Port)
end
diff --git a/spec/unit/resource/gem_package_spec.rb b/spec/unit/resource/gem_package_spec.rb
index 0f3eae70bb..6992d8ef17 100644
--- a/spec/unit/resource/gem_package_spec.rb
+++ b/spec/unit/resource/gem_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::GemPackage, "initialize" do
diff --git a/spec/unit/resource/git_spec.rb b/spec/unit/resource/git_spec.rb
index 6a39b3d172..5bdccc87b8 100644
--- a/spec/unit/resource/git_spec.rb
+++ b/spec/unit/resource/git_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::Git do
diff --git a/spec/unit/resource/group_spec.rb b/spec/unit/resource/group_spec.rb
index a4029fc911..56db882191 100644
--- a/spec/unit/resource/group_spec.rb
+++ b/spec/unit/resource/group_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Group, "initialize" do
before(:each) do
diff --git a/spec/unit/resource/homebrew_package_spec.rb b/spec/unit/resource/homebrew_package_spec.rb
index bb248d1189..6a3f88ceed 100644
--- a/spec/unit/resource/homebrew_package_spec.rb
+++ b/spec/unit/resource/homebrew_package_spec.rb
@@ -15,10 +15,10 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
-describe Chef::Resource::HomebrewPackage, 'initialize' do
+describe Chef::Resource::HomebrewPackage, "initialize" do
static_provider_resolution(
resource: Chef::Resource::HomebrewPackage,
@@ -28,22 +28,22 @@ describe Chef::Resource::HomebrewPackage, 'initialize' do
os: "mac_os_x",
)
- let(:resource) { Chef::Resource::HomebrewPackage.new('emacs') }
+ let(:resource) { Chef::Resource::HomebrewPackage.new("emacs") }
- shared_examples 'home_brew user set and returned' do
- it 'returns the configured homebrew_user' do
+ shared_examples "home_brew user set and returned" do
+ it "returns the configured homebrew_user" do
resource.homebrew_user user
expect(resource.homebrew_user).to eql(user)
end
end
- context 'homebrew_user is set' do
- let(:user) { 'Captain Picard' }
- include_examples 'home_brew user set and returned'
+ context "homebrew_user is set" do
+ let(:user) { "Captain Picard" }
+ include_examples "home_brew user set and returned"
- context 'as an integer' do
+ context "as an integer" do
let(:user) { 1001 }
- include_examples 'home_brew user set and returned'
+ include_examples "home_brew user set and returned"
end
end
diff --git a/spec/unit/resource/http_request_spec.rb b/spec/unit/resource/http_request_spec.rb
index aa4ce4dfbc..d8461854f9 100644
--- a/spec/unit/resource/http_request_spec.rb
+++ b/spec/unit/resource/http_request_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::HttpRequest do
diff --git a/spec/unit/resource/ifconfig_spec.rb b/spec/unit/resource/ifconfig_spec.rb
index e3e1f6daa2..9d775e7257 100644
--- a/spec/unit/resource/ifconfig_spec.rb
+++ b/spec/unit/resource/ifconfig_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Ifconfig do
@@ -49,8 +49,8 @@ describe Chef::Resource::Ifconfig do
shared_examples "being a platform based on an old Debian" do |platform, version|
before do
- @node.automatic_attrs[:os] = 'linux'
- @node.automatic_attrs[:platform_family] = 'debian'
+ @node.automatic_attrs[:os] = "linux"
+ @node.automatic_attrs[:platform_family] = "debian"
@node.automatic_attrs[:platform] = platform
@node.automatic_attrs[:platform_version] = version
end
@@ -62,8 +62,8 @@ describe Chef::Resource::Ifconfig do
shared_examples "being a platform based on RedHat" do |platform, version|
before do
- @node.automatic_attrs[:os] = 'linux'
- @node.automatic_attrs[:platform_family] = 'rhel'
+ @node.automatic_attrs[:os] = "linux"
+ @node.automatic_attrs[:platform_family] = "rhel"
@node.automatic_attrs[:platform] = platform
@node.automatic_attrs[:platform_version] = version
end
@@ -75,8 +75,8 @@ describe Chef::Resource::Ifconfig do
shared_examples "being a platform based on a recent Debian" do |platform, version|
before do
- @node.automatic_attrs[:os] = 'linux'
- @node.automatic_attrs[:platform_family] = 'debian'
+ @node.automatic_attrs[:os] = "linux"
+ @node.automatic_attrs[:platform_family] = "debian"
@node.automatic_attrs[:platform] = platform
@node.automatic_attrs[:platform_version] = version
end
diff --git a/spec/unit/resource/ips_package_spec.rb b/spec/unit/resource/ips_package_spec.rb
index 126ae00224..0725380620 100644
--- a/spec/unit/resource/ips_package_spec.rb
+++ b/spec/unit/resource/ips_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::IpsPackage, "initialize" do
diff --git a/spec/unit/resource/ksh_spec.rb b/spec/unit/resource/ksh_spec.rb
index 04bd8148fd..a188ed9802 100644
--- a/spec/unit/resource/ksh_spec.rb
+++ b/spec/unit/resource/ksh_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Ksh do
diff --git a/spec/unit/resource/link_spec.rb b/spec/unit/resource/link_spec.rb
index 220ad735bd..0ce5be1caf 100644
--- a/spec/unit/resource/link_spec.rb
+++ b/spec/unit/resource/link_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Link do
diff --git a/spec/unit/resource/log_spec.rb b/spec/unit/resource/log_spec.rb
index b2af194238..d6169ae315 100644
--- a/spec/unit/resource/log_spec.rb
+++ b/spec/unit/resource/log_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Log do
diff --git a/spec/unit/resource/macports_package_spec.rb b/spec/unit/resource/macports_package_spec.rb
index 0a203b2e97..488615f594 100644
--- a/spec/unit/resource/macports_package_spec.rb
+++ b/spec/unit/resource/macports_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::MacportsPackage, "initialize" do
diff --git a/spec/unit/resource/mdadm_spec.rb b/spec/unit/resource/mdadm_spec.rb
index 6ca99c58e5..f2d0e157af 100644
--- a/spec/unit/resource/mdadm_spec.rb
+++ b/spec/unit/resource/mdadm_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Mdadm do
diff --git a/spec/unit/resource/mount_spec.rb b/spec/unit/resource/mount_spec.rb
index acce26dcab..1dac2d5dd9 100644
--- a/spec/unit/resource/mount_spec.rb
+++ b/spec/unit/resource/mount_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Mount do
before(:each) do
@@ -54,7 +54,7 @@ describe Chef::Resource::Mount do
end
it "should set fsck_device to '-' by default" do
- expect(@resource.fsck_device).to eql('-')
+ expect(@resource.fsck_device).to eql("-")
end
it "should allow you to set the fsck_device attribute" do
diff --git a/spec/unit/resource/ohai_spec.rb b/spec/unit/resource/ohai_spec.rb
index 3bc21a41d2..0bf904ab0c 100644
--- a/spec/unit/resource/ohai_spec.rb
+++ b/spec/unit/resource/ohai_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Ohai do
diff --git a/spec/unit/resource/openbsd_package_spec.rb b/spec/unit/resource/openbsd_package_spec.rb
index 95921c2f02..34de97f931 100644
--- a/spec/unit/resource/openbsd_package_spec.rb
+++ b/spec/unit/resource/openbsd_package_spec.rb
@@ -19,8 +19,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'ostruct'
+require "spec_helper"
+require "ostruct"
describe Chef::Resource::OpenbsdPackage do
diff --git a/spec/unit/resource/osx_profile_spec.rb b/spec/unit/resource/osx_profile_spec.rb
index d7d72e5836..06a147ad84 100644
--- a/spec/unit/resource/osx_profile_spec.rb
+++ b/spec/unit/resource/osx_profile_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::OsxProfile do
let(:resource) { Chef::Resource::OsxProfile.new(
@@ -54,7 +54,7 @@ describe Chef::Resource::OsxProfile do
end
it "should allow you to set the profile attribute to a hash" do
- test_profile = { 'profile' => false }
+ test_profile = { "profile" => false }
resource.profile test_profile
expect(resource.profile).to be_a(Hash)
end
diff --git a/spec/unit/resource/package_spec.rb b/spec/unit/resource/package_spec.rb
index 449732a3c4..7f7a27e2b2 100644
--- a/spec/unit/resource/package_spec.rb
+++ b/spec/unit/resource/package_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Package do
diff --git a/spec/unit/resource/pacman_package_spec.rb b/spec/unit/resource/pacman_package_spec.rb
index 975863d04f..a383601d93 100644
--- a/spec/unit/resource/pacman_package_spec.rb
+++ b/spec/unit/resource/pacman_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::PacmanPackage, "initialize" do
diff --git a/spec/unit/resource/perl_spec.rb b/spec/unit/resource/perl_spec.rb
index 7247cce6e3..9a1ec22a95 100644
--- a/spec/unit/resource/perl_spec.rb
+++ b/spec/unit/resource/perl_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Perl do
diff --git a/spec/unit/resource/powershell_script_spec.rb b/spec/unit/resource/powershell_script_spec.rb
index 42fcd61a58..16d2d37c9e 100644
--- a/spec/unit/resource/powershell_script_spec.rb
+++ b/spec/unit/resource/powershell_script_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::PowershellScript do
@@ -25,7 +25,7 @@ describe Chef::Resource::PowershellScript do
node.default["kernel"] = Hash.new
node.default["kernel"][:machine] = :x86_64.to_s
- node.automatic[:os] = 'windows'
+ node.automatic[:os] = "windows"
run_context = Chef::RunContext.new(node, nil, nil)
@@ -94,7 +94,7 @@ describe Chef::Resource::PowershellScript do
it "enables convert_boolean_return by default for guards in non-Chef::Resource::Script derived resources when no guard params are specified" do
node = Chef::Node.new
run_context = Chef::RunContext.new(node, nil, nil)
- file_resource = Chef::Resource::File.new('idontexist', run_context)
+ file_resource = Chef::Resource::File.new("idontexist", run_context)
file_resource.guard_interpreter :powershell_script
allow_any_instance_of(Chef::GuardInterpreter::ResourceGuardInterpreter).to receive(:block_from_attributes).with(
@@ -103,21 +103,21 @@ describe Chef::Resource::PowershellScript do
end
it "enables convert_boolean_return by default for guards in the context of powershell_script when guard params are specified" do
- guard_parameters = {:cwd => '/etc/chef', :architecture => :x86_64}
+ guard_parameters = {:cwd => "/etc/chef", :architecture => :x86_64}
allow_any_instance_of(Chef::GuardInterpreter::ResourceGuardInterpreter).to receive(:block_from_attributes).with(
{:convert_boolean_return => true, :code => "$true"}.merge(guard_parameters)).and_return(Proc.new {})
resource.only_if("$true", guard_parameters)
end
it "passes convert_boolean_return as true if it was specified as true in a guard parameter" do
- guard_parameters = {:cwd => '/etc/chef', :convert_boolean_return => true, :architecture => :x86_64}
+ guard_parameters = {:cwd => "/etc/chef", :convert_boolean_return => true, :architecture => :x86_64}
allow_any_instance_of(Chef::GuardInterpreter::ResourceGuardInterpreter).to receive(:block_from_attributes).with(
{:convert_boolean_return => true, :code => "$true"}.merge(guard_parameters)).and_return(Proc.new {})
resource.only_if("$true", guard_parameters)
end
it "passes convert_boolean_return as false if it was specified as true in a guard parameter" do
- other_guard_parameters = {:cwd => '/etc/chef', :architecture => :x86_64}
+ other_guard_parameters = {:cwd => "/etc/chef", :architecture => :x86_64}
parameters_with_boolean_disabled = other_guard_parameters.merge({:convert_boolean_return => false, :code => "$true"})
allow_any_instance_of(Chef::GuardInterpreter::ResourceGuardInterpreter).to receive(:block_from_attributes).with(
parameters_with_boolean_disabled).and_return(Proc.new {})
@@ -129,7 +129,7 @@ describe Chef::Resource::PowershellScript do
let(:resource_instance) { @resource }
let(:resource_instance_name ) { @resource.command }
let(:resource_name) { :powershell_script }
- let(:interpreter_file_name) { 'powershell.exe' }
+ let(:interpreter_file_name) { "powershell.exe" }
it_behaves_like "a Windows script resource"
end
diff --git a/spec/unit/resource/python_spec.rb b/spec/unit/resource/python_spec.rb
index 8a3f7e48ca..a579eacdff 100644
--- a/spec/unit/resource/python_spec.rb
+++ b/spec/unit/resource/python_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Python do
diff --git a/spec/unit/resource/registry_key_spec.rb b/spec/unit/resource/registry_key_spec.rb
index 2d82f1a51c..05a0f5ce83 100644
--- a/spec/unit/resource/registry_key_spec.rb
+++ b/spec/unit/resource/registry_key_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::RegistryKey, "initialize" do
before(:each) do
@@ -80,38 +80,38 @@ describe Chef::Resource::RegistryKey, "values" do
end
it "should allow a single proper hash of registry values" do
- @resource.values( { :name => 'poosh', :type => :string, :data => 'carmen' } )
- expect(@resource.values).to eql([ { :name => 'poosh', :type => :string, :data => 'carmen' } ])
+ @resource.values( { :name => "poosh", :type => :string, :data => "carmen" } )
+ expect(@resource.values).to eql([ { :name => "poosh", :type => :string, :data => "carmen" } ])
end
it "should allow an array of proper hashes of registry values" do
- @resource.values [ { :name => 'poosh', :type => :string, :data => 'carmen' } ]
- expect(@resource.values).to eql([ { :name => 'poosh', :type => :string, :data => 'carmen' } ])
+ @resource.values [ { :name => "poosh", :type => :string, :data => "carmen" } ]
+ expect(@resource.values).to eql([ { :name => "poosh", :type => :string, :data => "carmen" } ])
end
it "should return checksummed data if the type is unsafe" do
- @resource.values( { :name => 'poosh', :type => :binary, :data => 255.chr * 1 })
- expect(@resource.values).to eql([ { :name => 'poosh', :type => :binary, :data => 'a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb89' } ])
+ @resource.values( { :name => "poosh", :type => :binary, :data => 255.chr * 1 })
+ expect(@resource.values).to eql([ { :name => "poosh", :type => :binary, :data => "a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb89" } ])
end
it "should throw an exception if the name field is missing" do
- expect { @resource.values [ { :type => :string, :data => 'carmen' } ] }.to raise_error(ArgumentError)
+ expect { @resource.values [ { :type => :string, :data => "carmen" } ] }.to raise_error(ArgumentError)
end
it "should throw an exception if the type field is missing" do
- expect { @resource.values [ { :name => 'poosh', :data => 'carmen' } ] }.to raise_error(ArgumentError)
+ expect { @resource.values [ { :name => "poosh", :data => "carmen" } ] }.to raise_error(ArgumentError)
end
it "should throw an exception if the data field is missing" do
- expect { @resource.values [ { :name => 'poosh', :type => :string } ] }.to raise_error(ArgumentError)
+ expect { @resource.values [ { :name => "poosh", :type => :string } ] }.to raise_error(ArgumentError)
end
it "should throw an exception if extra fields are present" do
- expect { @resource.values [ { :name => 'poosh', :type => :string, :data => 'carmen', :screwdriver => 'sonic' } ] }.to raise_error(ArgumentError)
+ expect { @resource.values [ { :name => "poosh", :type => :string, :data => "carmen", :screwdriver => "sonic" } ] }.to raise_error(ArgumentError)
end
it "should not allow a string" do
- expect { @resource.send(:values, 'souffle') }.to raise_error(ArgumentError)
+ expect { @resource.send(:values, "souffle") }.to raise_error(ArgumentError)
end
it "should not allow an integer" do
@@ -138,7 +138,7 @@ describe Chef::Resource::RegistryKey, "recursive" do
end
it "should not allow a string" do
- expect { @resource.recursive('souffle') }.to raise_error(ArgumentError)
+ expect { @resource.recursive("souffle") }.to raise_error(ArgumentError)
end
it "should not allow an integer" do
@@ -167,7 +167,7 @@ describe Chef::Resource::RegistryKey, "architecture" do
end
it "should not allow a string" do
- expect { @resource.architecture('souffle') }.to raise_error(ArgumentError)
+ expect { @resource.architecture("souffle") }.to raise_error(ArgumentError)
end
it "should not allow an integer" do
@@ -181,7 +181,7 @@ describe Chef::Resource::RegistryKey, ":unscrubbed_values" do
end
it "should return unsafe data as-is" do
- key_values = [ { :name => 'poosh', :type => :binary, :data => 255.chr * 1 } ]
+ key_values = [ { :name => "poosh", :type => :binary, :data => 255.chr * 1 } ]
@resource.values(key_values)
expect(@resource.unscrubbed_values).to eql(key_values)
end
@@ -193,7 +193,7 @@ describe Chef::Resource::RegistryKey, "state" do
end
it "should return scrubbed values" do
- @resource.values([ { :name => 'poosh', :type => :binary, :data => 255.chr * 1 } ])
- expect(@resource.state).to eql( { :values => [{ :name => 'poosh', :type => :binary, :data => 'a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb89'}] } )
+ @resource.values([ { :name => "poosh", :type => :binary, :data => 255.chr * 1 } ])
+ expect(@resource.state).to eql( { :values => [{ :name => "poosh", :type => :binary, :data => "a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb89"}] } )
end
end
diff --git a/spec/unit/resource/remote_directory_spec.rb b/spec/unit/resource/remote_directory_spec.rb
index 1ab75586b6..ac0cfcf8d5 100644
--- a/spec/unit/resource/remote_directory_spec.rb
+++ b/spec/unit/resource/remote_directory_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::RemoteDirectory do
diff --git a/spec/unit/resource/remote_file_spec.rb b/spec/unit/resource/remote_file_spec.rb
index 0a379ff574..746cdb195c 100644
--- a/spec/unit/resource/remote_file_spec.rb
+++ b/spec/unit/resource/remote_file_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::RemoteFile do
@@ -36,13 +36,13 @@ describe Chef::Resource::RemoteFile do
it "says its provider is RemoteFile when the source is an absolute URI" do
@resource.source("http://www.google.com/robots.txt")
expect(@resource.provider).to eq(Chef::Provider::RemoteFile)
- expect(Chef::Platform.find_provider(:noplatform, 'noversion', @resource)).to eq(Chef::Provider::RemoteFile)
+ expect(Chef::Platform.find_provider(:noplatform, "noversion", @resource)).to eq(Chef::Provider::RemoteFile)
end
it "says its provider is RemoteFile when the source is a network share" do
@resource.source("\\\\fakey\\fakerton\\fake.txt")
expect(@resource.provider).to eq(Chef::Provider::RemoteFile)
- expect(Chef::Platform.find_provider(:noplatform, 'noversion', @resource)).to eq(Chef::Provider::RemoteFile)
+ expect(Chef::Platform.find_provider(:noplatform, "noversion", @resource)).to eq(Chef::Provider::RemoteFile)
end
describe "source" do
@@ -60,7 +60,7 @@ describe Chef::Resource::RemoteFile do
expect(@resource.source).to eql([ "\\\\fakey\\fakerton\\fake.txt" ])
end
- it 'should accept file URIs with spaces' do
+ it "should accept file URIs with spaces" do
@resource.source("file:///C:/foo bar")
expect(@resource.source).to eql(["file:///C:/foo bar"])
end
diff --git a/spec/unit/resource/resource_notification_spec.rb b/spec/unit/resource/resource_notification_spec.rb
index 024b6f93f7..dfe5d25cec 100644
--- a/spec/unit/resource/resource_notification_spec.rb
+++ b/spec/unit/resource/resource_notification_spec.rb
@@ -15,8 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-require 'spec_helper'
-require 'chef/resource/resource_notification'
+require "spec_helper"
+require "chef/resource/resource_notification"
describe Chef::Resource::Notification do
diff --git a/spec/unit/resource/route_spec.rb b/spec/unit/resource/route_spec.rb
index ec1d369932..b38093887b 100644
--- a/spec/unit/resource/route_spec.rb
+++ b/spec/unit/resource/route_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Route do
diff --git a/spec/unit/resource/rpm_package_spec.rb b/spec/unit/resource/rpm_package_spec.rb
index b2e06f7f68..69412a8d06 100644
--- a/spec/unit/resource/rpm_package_spec.rb
+++ b/spec/unit/resource/rpm_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::RpmPackage, "initialize" do
diff --git a/spec/unit/resource/ruby_block_spec.rb b/spec/unit/resource/ruby_block_spec.rb
index 8664564ac5..d48fd9113c 100644
--- a/spec/unit/resource/ruby_block_spec.rb
+++ b/spec/unit/resource/ruby_block_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::RubyBlock do
diff --git a/spec/unit/resource/ruby_spec.rb b/spec/unit/resource/ruby_spec.rb
index e899810ab9..95078011ee 100644
--- a/spec/unit/resource/ruby_spec.rb
+++ b/spec/unit/resource/ruby_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Ruby do
diff --git a/spec/unit/resource/scm_spec.rb b/spec/unit/resource/scm_spec.rb
index 72319277ab..fadc9a3e54 100644
--- a/spec/unit/resource/scm_spec.rb
+++ b/spec/unit/resource/scm_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Scm do
@@ -184,7 +184,7 @@ describe Chef::Resource::Scm do
end
describe "when it has a environment attribute" do
- let(:test_environment) { {'CHEF_ENV' => '/tmp' } }
+ let(:test_environment) { {"CHEF_ENV" => "/tmp" } }
before { @resource.environment(test_environment) }
it "stores this environment" do
expect(@resource.environment).to eq(test_environment)
diff --git a/spec/unit/resource/script_spec.rb b/spec/unit/resource/script_spec.rb
index 4affee8e8c..45ad1e6cec 100644
--- a/spec/unit/resource/script_spec.rb
+++ b/spec/unit/resource/script_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Script do
let(:resource_instance_name) { "fakey_fakerton" }
diff --git a/spec/unit/resource/service_spec.rb b/spec/unit/resource/service_spec.rb
index b9e3757255..16288d7a90 100644
--- a/spec/unit/resource/service_spec.rb
+++ b/spec/unit/resource/service_spec.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Service do
diff --git a/spec/unit/resource/smartos_package_spec.rb b/spec/unit/resource/smartos_package_spec.rb
index c2cf546dd5..24e65e6c3c 100644
--- a/spec/unit/resource/smartos_package_spec.rb
+++ b/spec/unit/resource/smartos_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::SmartosPackage, "initialize" do
diff --git a/spec/unit/resource/solaris_package_spec.rb b/spec/unit/resource/solaris_package_spec.rb
index f5d3e669a1..a97730aea6 100644
--- a/spec/unit/resource/solaris_package_spec.rb
+++ b/spec/unit/resource/solaris_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::SolarisPackage, "initialize" do
diff --git a/spec/unit/resource/subversion_spec.rb b/spec/unit/resource/subversion_spec.rb
index aa4d1ed708..b2d3689dc9 100644
--- a/spec/unit/resource/subversion_spec.rb
+++ b/spec/unit/resource/subversion_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::Subversion do
@@ -42,7 +42,7 @@ describe Chef::Resource::Subversion do
end
it "sets svn info arguments to --no-auth-cache by default" do
- expect(@svn.svn_info_args).to eq('--no-auth-cache')
+ expect(@svn.svn_info_args).to eq("--no-auth-cache")
end
it "resets svn info arguments to nil when given false in the setter" do
@@ -51,7 +51,7 @@ describe Chef::Resource::Subversion do
end
it "sets svn arguments to --no-auth-cache by default" do
- expect(@svn.svn_arguments).to eq('--no-auth-cache')
+ expect(@svn.svn_arguments).to eq("--no-auth-cache")
end
it "sets svn binary to nil by default" do
diff --git a/spec/unit/resource/template_spec.rb b/spec/unit/resource/template_spec.rb
index 2fd951b72d..2e7c1781d1 100644
--- a/spec/unit/resource/template_spec.rb
+++ b/spec/unit/resource/template_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::Template do
diff --git a/spec/unit/resource/timestamped_deploy_spec.rb b/spec/unit/resource/timestamped_deploy_spec.rb
index 4ebfdaf059..851cbf4f35 100644
--- a/spec/unit/resource/timestamped_deploy_spec.rb
+++ b/spec/unit/resource/timestamped_deploy_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::TimestampedDeploy, "initialize" do
@@ -25,8 +25,8 @@ describe Chef::Resource::TimestampedDeploy, "initialize" do
provider: Chef::Provider::Deploy::Timestamped,
name: :timestamped_deploy,
action: :deploy,
- os: 'linux',
- platform_family: 'rhel',
+ os: "linux",
+ platform_family: "rhel",
)
end
diff --git a/spec/unit/resource/user_spec.rb b/spec/unit/resource/user_spec.rb
index 3bf7e6187b..e259653120 100644
--- a/spec/unit/resource/user_spec.rb
+++ b/spec/unit/resource/user_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::User, "initialize" do
before(:each) do
diff --git a/spec/unit/resource/windows_package_spec.rb b/spec/unit/resource/windows_package_spec.rb
index 3623c24e29..ba336a4afd 100644
--- a/spec/unit/resource/windows_package_spec.rb
+++ b/spec/unit/resource/windows_package_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::WindowsPackage, "initialize" do
before(:each) do
@@ -80,12 +80,12 @@ describe Chef::Resource::WindowsPackage, "initialize" do
end
it "supports the checksum attribute" do
- resource.checksum('somechecksum')
- expect(resource.checksum).to eq('somechecksum')
+ resource.checksum("somechecksum")
+ expect(resource.checksum).to eq("somechecksum")
end
- context 'when a URL is used' do
- let(:resource_source) { 'https://foo.bar/solitare.msi' }
+ context "when a URL is used" do
+ let(:resource_source) { "https://foo.bar/solitare.msi" }
let(:resource) { Chef::Resource::WindowsPackage.new(resource_source) }
it "should return the source unmodified" do
diff --git a/spec/unit/resource/windows_service_spec.rb b/spec/unit/resource/windows_service_spec.rb
index 64bb05afc4..04a27090a5 100644
--- a/spec/unit/resource/windows_service_spec.rb
+++ b/spec/unit/resource/windows_service_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::WindowsService, "initialize" do
static_provider_resolution(
diff --git a/spec/unit/resource/yum_package_spec.rb b/spec/unit/resource/yum_package_spec.rb
index f24f1e3405..4c175bb905 100644
--- a/spec/unit/resource/yum_package_spec.rb
+++ b/spec/unit/resource/yum_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'support/shared/unit/resource/static_provider_resolution'
+require "spec_helper"
+require "support/shared/unit/resource/static_provider_resolution"
describe Chef::Resource::YumPackage, "initialize" do
@@ -26,8 +26,8 @@ describe Chef::Resource::YumPackage, "initialize" do
provider: Chef::Provider::Package::Yum,
name: :yum_package,
action: :install,
- os: 'linux',
- platform_family: 'rhel',
+ os: "linux",
+ platform_family: "rhel",
)
end