summaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
blob: 3017f272a9910e2b1647b85daa74f59ca5a6d7d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
dir = File.expand_path(File.dirname(__FILE__))
$:.unshift("#{dir}/lib")
$:.unshift("#{dir}/../lib")

# Add the old test dir, so that we can still find mocha and spec
$:.unshift("#{dir}/../test/lib")

require 'mocha'
require 'puppettest'
require 'spec'

Spec::Runner.configure do |config|
  config.mock_with :mocha
  config.prepend_before :each do
      setup() if respond_to? :setup
  end

  config.prepend_after :each do
      teardown() if respond_to? :teardown
  end
end