From 806430224ad0da860be3761ab83f1e574b64fc60 Mon Sep 17 00:00:00 2001 From: Jeff McCune Date: Thu, 29 Aug 2013 12:54:14 -0700 Subject: (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. --- spec/functions/ensure_packages_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/functions/ensure_packages_spec.rb') 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 -- cgit v1.2.3