Permalink
Browse files

More updates to rspec setup to enable rspec-puppet testing: add empty…

… site.pp fixture, add module fixtures directory to .gitignore, updates to spec_helper.rb based on same file puppetlabs-nova.
  • Loading branch information...
jmchilton committed May 9, 2012
1 parent 6a2509b commit 72f64f1620aeac1c188e1a3ec5bd55385d5aa13c
Showing with 8 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. 0 spec/fixtures/manifests/site.pp
  3. +7 −0 spec/spec_helper.rb
View
@@ -1,3 +1,4 @@
pkg/
*.swp
metadata.json
+spec/fixtures/modules/*
No changes.
View
@@ -6,6 +6,13 @@ def param_value(subject, type, title, param)
subject.resource(type, title).send(:parameters)[param.to_sym]
end
+# Used to verify file contents via rspec-puppet, code copied from
+# puppetlabs-nova's spec_helper.rb
+def verify_contents(subject, title, expected_lines)
+ content = subject.resource('file', title).send(:parameters)[:content]
+ (content.split("\n") & expected_lines).should == expected_lines
+end
+
Puppet.parse_config
puppet_module_path = Puppet[:modulepath]

0 comments on commit 72f64f1

Please sign in to comment.