rspec/rspec-support — pull request #111 by samphippen (2014-09-11 10:51:32+00:00)
Title: Allow matchers to match multiple parts of an actual values list.

In: https://github.com/rspec/rspec-mocks/issues/707 @hunner asked for
the ability to match variable arguments with argument matchers. In
order to do this the matcher logic needed to be changed so that a
matcher could match potentially more than one value in an actual values
array.

This patch changes fuzzy_matcher to wrap each "expected" value in what
I'm calling a "consumer". These consumers act a little bit like states
in a DFA, where each state knows whether it can consume more input and
whether it has accepted all of the values. In RSpec Mocks 8985b8c I
created an example of this for any_args which will resolve rspec-mocks