summaryrefslogtreecommitdiff
path: root/chef-config/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-09-20 23:57:26 -0700
committerTim Smith <tsmith84@gmail.com>2020-09-20 23:57:26 -0700
commiteb49e6b6b8c160da0cf53f05fefa1c90d7a3a993 (patch)
treeec146beb48dda66abdefe0d0330c71c053498b18 /chef-config/spec
parentcb6ee920847d91b8c6cd8e7cb210b8a4fc730e69 (diff)
downloadchef-eb49e6b6b8c160da0cf53f05fefa1c90d7a3a993.tar.gz
Gate requires in chef-utils and chef-config as wellrequires
Update the cop config to handle those as well Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'chef-config/spec')
-rw-r--r--chef-config/spec/spec_helper.rb2
-rw-r--r--chef-config/spec/unit/fips_spec.rb2
-rw-r--r--chef-config/spec/unit/workstation_config_loader_spec.rb4
3 files changed, 4 insertions, 4 deletions
diff --git a/chef-config/spec/spec_helper.rb b/chef-config/spec/spec_helper.rb
index 557f1f6432..fb6e78a6b1 100644
--- a/chef-config/spec/spec_helper.rb
+++ b/chef-config/spec/spec_helper.rb
@@ -1,4 +1,4 @@
-require "chef-utils"
+require "chef-utils" unless defined?(ChefUtils)
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
diff --git a/chef-config/spec/unit/fips_spec.rb b/chef-config/spec/unit/fips_spec.rb
index 5ee62b6c79..4be6f64a2d 100644
--- a/chef-config/spec/unit/fips_spec.rb
+++ b/chef-config/spec/unit/fips_spec.rb
@@ -20,7 +20,7 @@ require "chef-config/fips"
require "spec_helper"
begin
- require "win32/registry"
+ require "win32/registry" unless defined?(Win32::Registry)
rescue LoadError
# not on unix
end
diff --git a/chef-config/spec/unit/workstation_config_loader_spec.rb b/chef-config/spec/unit/workstation_config_loader_spec.rb
index c589b298ae..cffc316240 100644
--- a/chef-config/spec/unit/workstation_config_loader_spec.rb
+++ b/chef-config/spec/unit/workstation_config_loader_spec.rb
@@ -17,10 +17,10 @@
#
require "spec_helper"
-require "tempfile"
+require "tempfile" unless defined?(Tempfile)
require "chef-config/exceptions"
-require "chef-utils"
+require "chef-utils" unless defined?(ChefUtils)
require "chef-config/workstation_config_loader"
RSpec.describe ChefConfig::WorkstationConfigLoader do