summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-03-11 16:44:00 -0700
committerGitHub <noreply@github.com>2020-03-11 16:44:00 -0700
commit8374ebdd787641b010e872c69846241a90f9a0b4 (patch)
tree865bb950d7102af9d2e03c7da664f51e8cf5aadc
parentaf9437fa889b0dc08be3078a8a216d850acd0e77 (diff)
parentc14f8414009ba41fd5634acc83817b226901ae80 (diff)
downloadchef-8374ebdd787641b010e872c69846241a90f9a0b4.tar.gz
Merge pull request #9479 from chef/fix-rspec-load-path
Fix load path in test runs.
-rw-r--r--spec/spec_helper.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 605f920125..54e0ef41b1 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -24,18 +24,16 @@ module Shell
IRB = nil unless defined? IRB
end
-# Ruby 1.9 Compat
-$:.unshift File.expand_path("../..", __FILE__)
+$LOAD_PATH.unshift File.expand_path("../..", __FILE__)
+
+$LOAD_PATH.unshift File.expand_path("../../chef-config/lib", __FILE__)
+$LOAD_PATH.unshift File.expand_path("../../chef-utils/lib", __FILE__)
require "rubygems"
require "rspec/mocks"
require "webmock/rspec"
-$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
-$:.unshift(File.expand_path("../lib", __FILE__))
-$:.unshift(File.dirname(__FILE__))
-
if ENV["COVERAGE"]
require "simplecov"
SimpleCov.start do