rspec/rspec-expectations — Issue #100: misleading diff for include matcher
Author: jarib
Created: 2011-12-28 22:28:01+00:00
State: open

Code:

```ruby
[{:foo => 1}].should include({:foo => 1}, {:bar => 2})
```

Error:

```
Failure/Error: [{:foo => 1}].should include({:foo => 1}, {:bar => 2})
expected [{:foo=>1}] to include {:foo=>1} and {:bar=>2}
Diff:
@@ -1,2 +1,2 @@
-{:foo=>1}
+[{:foo=>1}]
```

I would expect ```{:bar => 2``` to be mentioned in the diff. For larger arrays the current behaviour can make the failure very hard to spot.