diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-07-24 11:16:57 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-07-24 11:16:57 -0700 |
commit | 41822debf8c86d38e046cc7b7e70a06d9bc2ebc5 (patch) | |
tree | d2b35800ddcce1266386f1b83f01d62dae5416e9 /lib | |
parent | 9954314726362b4bc7ce23b8330802c3c0a7fc77 (diff) | |
download | chef-41822debf8c86d38e046cc7b7e70a06d9bc2ebc5.tar.gz |
the require needs to not be lazy
the lazy require here trolls the stubstatic file stubbing that we
do in all the file provider spec tests. change it to be eager
requiring, but we need to protect it so it only gets required
on windows.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/mixin/file_class.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/chef/mixin/file_class.rb b/lib/chef/mixin/file_class.rb index f6a663daed..6dfabbe714 100644 --- a/lib/chef/mixin/file_class.rb +++ b/lib/chef/mixin/file_class.rb @@ -18,13 +18,16 @@ # limitations under the License. # +if Chef::Platform.windows? + require 'chef/win32/file' +end + class Chef module Mixin module FileClass def file_class @host_os_file ||= if Chef::Platform.windows? - require 'chef/win32/file' Chef::ReservedNames::Win32::File else ::File |