Sha256: 6aed17cc5fa9529a08db0e3c90c57033e38a58691d22b2e10c481c48652f0ddc

Contents?: true

Size: 256 Bytes

Versions: 4

Compression:

Stored size: 256 Bytes

Contents

# This defines a matcher we can use to test the result of an each method on an object
RSpec::Matchers.define :expand_each_to do |expected|  
  match do |actual|
    expanded = []
    actual.each {|v| expanded << v}
    expanded.should == expected
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
miniprofiler-0.1.7.4 spec/support/expand_each_to_matcher.rb
miniprofiler-0.1.7.3 spec/support/expand_each_to_matcher.rb
miniprofiler-0.1.7.2 spec/support/expand_each_to_matcher.rb
miniprofiler-0.1.7.1 spec/support/expand_each_to_matcher.rb