blob: 9f91c975575c8a29d2a3d7ee61146eb4c94582e2 (
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
25
|
dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift("#{dir}/")
$LOAD_PATH.unshift("#{dir}/../lib")
# include any gems in vendor/gems
Dir["#{dir}/../vendor/gems/**"].each do |path|
libpath = File.join(path, "lib")
if File.directory?(libpath)
$LOAD_PATH.unshift(libpath)
else
$LOAD_PATH.unshift(path)
end
end
require 'mocha'
require 'spec'
require 'facter'
# load any monkey-patches
Dir["#{dir}/monkey_patches/*.rb"].map { |file| require file }
Spec::Runner.configure do |config|
config.mock_with :mocha
end
|