We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76d0ec4 commit 530d2efCopy full SHA for 530d2ef
1 file changed
spec/functions/ensure_packages_spec.rb
@@ -41,4 +41,16 @@
41
it { expect(lambda { catalogue }).to contain_package('foo').with({'provider' => 'rpm', 'ensure' => 'present'}) }
42
it { expect(lambda { catalogue }).to contain_package('bar').with({'provider' => 'gem', 'ensure' => 'present'}) }
43
end
44
+
45
+ context 'given a catalog with "package { puppet: ensure => present }"' do
46
+ let(:pre_condition) { 'package { puppet: ensure => present }' }
47
48
+ describe 'after running ensure_package("puppet", { "ensure" => "installed" })' do
49
+ before { subject.call(['puppet', { "ensure" => "installed" }]) }
50
51
+ # this lambda is required due to strangeness within rspec-puppet's expectation handling
52
+ it { expect(lambda { catalogue }).to contain_package('puppet').with_ensure('present') }
53
+ end
54
55
56
0 commit comments