diff options
Diffstat (limited to 'spec/support/mock')
-rw-r--r-- | spec/support/mock/constant.rb | 4 | ||||
-rw-r--r-- | spec/support/mock/platform.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/support/mock/constant.rb b/spec/support/mock/constant.rb index c706ad29dd..98756d715f 100644 --- a/spec/support/mock/constant.rb +++ b/spec/support/mock/constant.rb @@ -23,7 +23,7 @@ def mock_constants(constants, &block) end def parse_constant(constant) - source, _, constant_name = constant.to_s.rpartition('::') + source, _, constant_name = constant.to_s.rpartition("::") [constantize(source), constant_name] end @@ -41,7 +41,7 @@ end # File activesupport/lib/active_support/inflector/methods.rb, line 209 def constantize(camel_cased_word) - names = camel_cased_word.split('::') + names = camel_cased_word.split("::") names.shift if names.empty? || names.first.empty? constant = Object diff --git a/spec/support/mock/platform.rb b/spec/support/mock/platform.rb index 7eae82fe7d..a8bbf13589 100644 --- a/spec/support/mock/platform.rb +++ b/spec/support/mock/platform.rb @@ -7,7 +7,7 @@ # or +Chef::FileAccessControl+ def platform_mock(platform = :unix, &block) allow(ChefConfig).to receive(:windows?).and_return(platform == :windows ? true : false) - ENV['SYSTEMDRIVE'] = (platform == :windows ? 'C:' : nil) + ENV["SYSTEMDRIVE"] = (platform == :windows ? "C:" : nil) if platform == :windows Chef::Config.set_defaults_for_windows @@ -16,7 +16,7 @@ def platform_mock(platform = :unix, &block) end if block_given? - mock_constants({"RUBY_PLATFORM" => (platform == :windows ? 'i386-mingw32' : 'x86_64-darwin11.2.0'), + mock_constants({"RUBY_PLATFORM" => (platform == :windows ? "i386-mingw32" : "x86_64-darwin11.2.0"), "File::PATH_SEPARATOR" => (platform == :windows ? ";" : ":"), "File::ALT_SEPARATOR" => (platform == :windows ? "\\" : nil) }) do yield |