Skip to content

Commit 8064302

Browse files
author
Jeff McCune
committed
(maint) Fix failing spec test with Puppet 3.3.0-rc2
Without this patch the stdlib spec tests are failing against recent versions of Puppet. The root cause of this problem is a change in the behavior of create_resources in Puppet 6baa57b. The change in behavior caused the :name key to be omitted from the hash returned by Puppet::Parser::Resource#to_hash which in turn is causing the test failure. This patch addresses the problem by updating the test to match the description of the example. Only the attribute :ensure is checked instead of the full hash itself.
1 parent 1057558 commit 8064302

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/functions/ensure_packages_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
it 'declares package resources with ensure => present' do
3737
should run.with_params(['facter'])
3838
rsrc = compiler.catalog.resource('Package[facter]')
39-
rsrc.to_hash.should == {:name => "facter", :ensure => "present"}
39+
rsrc.to_hash[:ensure].should eq("present")
4040
end
4141
end
4242
end

0 commit comments

Comments
 (0)