Skip to content

Instantly share code, notes, and snippets.

@rodjek
Created July 17, 2011 00:30
Show Gist options
  • Save rodjek/1086976 to your computer and use it in GitHub Desktop.
Save rodjek/1086976 to your computer and use it in GitHub Desktop.
RSpec for Puppet manifests
require 'puppet-rspec'
RSpec.configure do |c|
c.include PuppetRSpec
end
describe 'sysctl' do
let(:node) { 'testhost.example.com' }
let(:name) { 'baz' }
let(:params) { { :value => 'foo' } }
subject do
catalogue_for('sysctl', params, '/Users/tsharpe/code/github/puppet/modules')
end
it { should create_exec('sysctl/reload') }
it { should create_exec('sysctl/reload').with_command("/sbin/sysctl -p /etc/sysctl.conf") }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment