1 shared_examples_for "a Puppet::Error" do |description|
2 it "with message matching #{description.inspect}" do
3 expect { should have_class_count(1) }.to raise_error(Puppet::Error, description)
7 shared_examples 'generic nova service' do |service|
9 context 'with default parameters' do
10 it 'installs package and service' do
11 should contain_package(service[:name]).with({
12 :name => service[:package_name],
14 :notify => "Service[#{service[:name]}]",
15 :tag => ['openstack', 'nova']
17 should contain_service(service[:name]).with({
18 :name => service[:service_name],
26 context 'with overridden parameters' do
29 :ensure_package => '2012.1-2' }
32 it 'installs package and service' do
33 should contain_package(service[:name]).with({
34 :name => service[:package_name],
35 :ensure => '2012.1-2',
36 :notify => "Service[#{service[:name]}]"
38 should contain_service(service[:name]).with({
39 :name => service[:service_name],
47 context 'while not managing service state' do
50 :manage_service => false }
53 it 'does not control service state' do
54 should contain_service(service[:name]).without_ensure