blob: 483d4dc8035558ee44c6d641186ef6f8b21f400e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
dir = File.expand_path(File.dirname(__FILE__))
SPECDIR = dir
$LOAD_PATH.unshift("#{dir}/")
$LOAD_PATH.unshift("#{dir}/../lib")
require 'rubygems'
require 'mocha'
require 'rspec'
require 'facter'
# load any monkey-patches
Dir["#{dir}/monkey_patches/*.rb"].map { |file| require file }
RSpec.configure do |config|
config.mock_with :mocha
# Ensure that we don't accidentally cache between test cases.
config.before :each do
Facter::Util::Loader.any_instance.stubs(:load_all)
Facter.clear
end
end
|