diff options
author | Luke Kanies <luke@madstop.com> | 2008-02-12 22:11:30 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-02-12 22:11:30 -0600 |
commit | 1b90f7f8b523b32439e17f27b9f924bea8f1e74b (patch) | |
tree | cb4c05581b378b9358191cf7908acf1dc451757a /spec/spec_helper.rb | |
parent | bcb9b564281003e22d72752d84fa9dc9c8c7107b (diff) | |
download | puppet-1b90f7f8b523b32439e17f27b9f924bea8f1e74b.tar.gz puppet-1b90f7f8b523b32439e17f27b9f924bea8f1e74b.tar.xz puppet-1b90f7f8b523b32439e17f27b9f924bea8f1e74b.zip |
Trying to upgrade rspec, but not having much luck.
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 |