39
|
1 dir = File.expand_path(File.dirname(__FILE__))
|
|
2 $LOAD_PATH.unshift File.join(dir, 'lib')
|
|
3
|
|
4 # Don't want puppet getting the command line arguments for rake or autotest
|
|
5 ARGV.clear
|
|
6
|
|
7 require 'rubygems'
|
|
8 require 'bundler/setup'
|
|
9 require 'rspec-puppet'
|
|
10
|
|
11 Bundler.require :default, :test
|
|
12
|
|
13 require 'pathname'
|
|
14 require 'tmpdir'
|
|
15
|
|
16 Pathname.glob("#{dir}/shared_behaviours/**/*.rb") do |behaviour|
|
|
17 require behaviour.relative_path_from(Pathname.new(dir))
|
|
18 end
|
|
19
|
|
20 fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
|
|
21
|
|
22 RSpec.configure do |config|
|
|
23 config.tty = true
|
|
24 config.mock_with :rspec do |c|
|
|
25 c.syntax = :expect
|
|
26 end
|
|
27 config.module_path = File.join(fixture_path, 'modules')
|
|
28 config.manifest_dir = File.join(fixture_path, 'manifests')
|
|
29 end
|