File tree 3 files changed +6
-18
lines changed
3 files changed +6
-18
lines changed Original file line number Diff line number Diff line change
1
+ ../../../
Original file line number Diff line number Diff line change 1
1
require 'puppet'
2
2
require 'rspec-puppet'
3
- require 'tmpdir '
3
+ require 'puppet_spec_helper '
4
4
5
- RSpec . configure do |c |
6
- c . before :each do
7
- # Create a temporary puppet confdir area and temporary site.pp so
8
- # when rspec-puppet runs we don't get a puppet error.
9
- @puppetdir = Dir . mktmpdir ( "ntp" )
10
- manifestdir = File . join ( @puppetdir , "manifests" )
11
- Dir . mkdir ( manifestdir )
12
- FileUtils . touch ( File . join ( manifestdir , "site.pp" ) )
13
- Puppet [ :confdir ] = @puppetdir
14
- Puppet . settings . send ( :initialize_everything_for_tests ) unless Puppet . version =~ /^2\. 6/
15
- end
16
-
17
- c . after :each do
18
- Puppet . settings . send ( :clear_everything_for_tests ) unless Puppet . version =~ /^2\. 6/
19
- FileUtils . remove_entry_secure ( @puppetdir )
20
- end
5
+ fixture_dir = File . join ( dir = File . expand_path ( File . dirname ( __FILE__ ) ) , "fixtures" )
21
6
22
- c . module_path = File . join ( File . dirname ( __FILE__ ) , '../../' )
7
+ RSpec . configure do |c |
8
+ c . module_path = File . join ( fixture_dir , 'modules' )
9
+ c . manifest_dir = File . join ( fixture_dir , 'manifests' )
23
10
end
You can’t perform that action at this time.
0 commit comments