diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3aa3b0202..97ab007b0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,7 +5,7 @@ $LOAD_PATH.unshift("#{dir}/../lib") $LOAD_PATH.unshift("#{dir}/../test/lib") # Add the old test dir, so that we can still find our local mocha and spec # include any gems in vendor/gems -Dir["#{dir}/../vendor/gems/**"].map do |path| +Dir["#{dir}/../vendor/gems/**"].each do |path| libpath = File.join(path, "lib") if File.directory?(libpath) $LOAD_PATH.unshift(libpath) @@ -19,13 +19,16 @@ require 'puppettest/runnable_test' require 'mocha' require 'spec' + Spec::Runner.configure do |config| config.mock_with :mocha - config.prepend_before :each do + + config.prepend_before :all do + setup_mocks_for_rspec setup() if respond_to? :setup end - config.prepend_after :each do + config.prepend_after :all do teardown() if respond_to? :teardown end end |