Skip to content

Commit

Permalink
Puppet 2.7 under 1.9.x converts all array members to strings
Browse files Browse the repository at this point in the history
This hack should keep things working the same under 1.8 and 1.9
  • Loading branch information
rodjek committed Apr 6, 2012
1 parent 398fc77 commit aa73753
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/rspec-puppet/matchers/create_generic.rb
Expand Up @@ -50,6 +50,11 @@ def matches?(catalogue)
ret = false
(@errors ||= []) << "#{name.to_s} matching `#{value.inspect}` but its value of `#{rsrc_hsh[name.to_sym].inspect}` does not"
end
elsif value.kind_of?(Array) then
unless rsrc_hsh[name.to_sym].join == value.join
ret = false
(@errors ||= []) << "#{name.to_s} set to `#{value.inspect}` but it is set to `#{rsrc_hsh[name.to_sym].inspect}` in the catalogue"
end
else
unless rsrc_hsh[name.to_sym].to_s == value.to_s
ret = false
Expand Down

0 comments on commit aa73753

Please sign in to comment.