search for: array_includ

Displaying 1 result from an estimated 1 matches for "array_includ".

2008 Aug 27
3
array_including()
I found myself having to write this today: class ArrayMatcher def initialize(array_to_match) @array_to_match = array_to_match end def ==(other) ok = true @array_to_match.each do |item| ok = ok and other.include?(item) end ok end end def array_including(array_to_match) ArrayMatcher.new(array_to_match) end Is there already something in the framework that does this? cheers, Matt ---- http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily reflect the views...