Sha256: 862f1eada1289dbb6e0591c7ae0aa8062f74c30a964e0474ec68aeed7711d29b
Contents?: true
Size: 461 Bytes
Versions: 12
Compression:
Stored size: 461 Bytes
Contents
RSpec::Matchers.define :include_in_order do |*expected| match do |actual| elements = expected.dup actual.each do |elt| if elt == elements.first elements.shift end end elements.empty? end def failure_message "expected #{@actual.inspect} to include#{expected_to_sentence} in order" end def failure_message_when_negated "expected #{@actual.inspect} not to include#{expected_to_sentence} in order" end end
Version data entries
12 entries across 12 versions & 1 rubygems