summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/spec_helper.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 01ff1d3c47..59515d4f7b 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -24,16 +24,18 @@ module Shell
IRB = nil unless defined? IRB
end
-$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__)
+# Ruby 1.9 Compat
+$:.unshift File.expand_path("../..", __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__))
+
require "chef"
require "chef/knife"