File tree 2 files changed +17
-7
lines changed
2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ RSpec.configure do |c|
32
32
puppet_install
33
33
34
34
# Copy this module into the module path of the test node
35
- puppet_module_install(:source => proj_root, :module_name => 'redis ')
35
+ puppet_module_install(:source => proj_root, :module_name => '<%= metadata . name %> ')
36
36
shell('puppet module install puppetlabs/stdlib')
37
37
38
38
file = Tempfile.new('foo')
Original file line number Diff line number Diff line change 1
1
require 'spec_helper_system'
2
2
3
- describe 'basic tests' do
4
- it 'class should work without errors' do
5
- pp = < < -EOS
6
- class { '<%= metadata . name %> ': }
7
- EOS
3
+ describe 'install:' do
4
+ after :all do
5
+ # Cleanup after tests have ran
6
+ puppet_apply("class { '<%= metadata.name %> ': ensure = > absent }") do |r|
7
+ r.exit_code.should_not == 1
8
+ end
9
+ end
10
+
11
+ it 'test <%= metadata . name %> ' do
12
+ pp = fixture_read('modules/<%= metadata . name %> /tests/init.pp')
8
13
9
14
puppet_apply(pp) do |r|
10
- r.exit_code.should == 2
15
+ r.exit_code.should_not == 1
16
+ end
17
+
18
+ puppet_apply(pp) do |r|
19
+ r.exit_code.should be_zero
11
20
end
12
21
end
22
+
13
23
end
You can’t perform that action at this time.
0 commit comments