puppetlabs-stdlib/spec
Jeff McCune b7a59a8095 (#11901) Fix sort order error in tests for 'keys' and 'values'
Between Ruby 1.8.7 p352 and p357 the way arrays were returned when using
keys and values in Ruby changed, and due to assumption about the
ordering our tests are now failing.

This patch fixes the issue by using the =~ operator matcher in rspec.
This matcher is implemented as RSpec::Matchers::MatchArray and performs
multiset equality matching of arrays.  Order doesn't matter, but
duplicate values do.

This patch also switches @scope instance variables to memoized let
methods for clarity in the code.

Original Author: Ken Barber
Reviewed-by: Nick Lewis

This commit closes GH-29
2012-01-11 17:39:15 -08:00
..
lib/puppet_spec Copied function test scaffolding from puppet. 2011-06-29 12:25:43 +01:00
monkey_patches Copied function test scaffolding from puppet. 2011-06-29 12:25:43 +01:00
unit (#11901) Fix sort order error in tests for 'keys' and 'values' 2012-01-11 17:39:15 -08:00
spec.opts Copied function test scaffolding from puppet. 2011-06-29 12:25:43 +01:00
spec_helper.rb (Maint) Make rspec tests work with Puppet 2.6.4 2011-10-10 11:58:48 -07:00
watchr.rb (Maint) Add watchr autotest script 2011-10-10 12:03:57 -07:00