Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
Created February 14, 2012 18:28
Show Gist options
  • Save jedi4ever/1828847 to your computer and use it in GitHub Desktop.
Save jedi4ever/1828847 to your computer and use it in GitHub Desktop.
question - rspec-puppet
I wonder if you can describe a test in rspec-puppet just to check if a certain host/name includes a class ?
I'm aware of define, function and class, but it seems host would be useful?
For one class like java you can write the test in the java class only but for multiple classes to cooperate it would be nice to check if a host always has some classes applied.
describe 'myhostname', :type => host do
it { should include_class('java') }
end
node /myhostname/ {
include java
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment