summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff McCune <jeff@puppetlabs.com>2013-08-29 12:54:14 -0700
committerJeff McCune <jeff@puppetlabs.com>2013-08-29 13:02:31 -0700
commit806430224ad0da860be3761ab83f1e574b64fc60 (patch)
tree1e93c09ae8d1eda559a71b698b55750268fe7164
parent10575587f42fcd84284e0ba85a6c656a37870aa8 (diff)
(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.
-rw-r--r--spec/functions/ensure_packages_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/functions/ensure_packages_spec.rb b/spec/functions/ensure_packages_spec.rb
index 1c2a328..6fd56d5 100644
--- a/spec/functions/ensure_packages_spec.rb
+++ b/spec/functions/ensure_packages_spec.rb
@@ -36,7 +36,7 @@ describe 'ensure_packages' do
it 'declares package resources with ensure => present' do
should run.with_params(['facter'])
rsrc = compiler.catalog.resource('Package[facter]')
- rsrc.to_hash.should == {:name => "facter", :ensure => "present"}
+ rsrc.to_hash[:ensure].should eq("present")
end
end
end