rspec/rspec-mocks — pull request #751 by samphippen (2014-08-03 10:45:29+00:00)
Title: Use the differ to print diffs when args are mismatched between expectations and calls

Related #434. This uses the differ that is now in RSpec support to
perform argument diffing when arguments don't match.

Things worth noting/still to do:

* Special case behaviour needs to be added for the no arguments matcher
and the any arguments matcher, at the moment something like this:
@@ -1,2 +1,2 @@
-[#]
+[{:bees=>:foo}]
gets printed, and that's obviously not great.
* Need to work out what to do in the "similar args" case where there are
potentially multiple calls. I think the best thing to do would be to
would be to only diff if there's one call. (@myronmarston maybe has thoughts?)

There's some refactoring that could be done here but I want to finish
implementing the "similar args" implementation before I do that so that
I'm sure that I'm refactoring the right thing.

Also: needs more specs.