Permalink
Browse files

make include matcher diffable

  • Loading branch information...
1 parent 6db8a2a commit 119e018c97d2fdf360464769b62df3842dd5f9d1 @dchelimsky dchelimsky committed Dec 29, 2011
Showing with 293 additions and 283 deletions.
  1. +1 −1 lib/rspec/expectations/differ.rb
  2. +4 −0 lib/rspec/matchers/include.rb
  3. +288 −282 spec/rspec/matchers/include_spec.rb
@@ -64,7 +64,7 @@ def object_to_string(object)
%(#{PP.singleline_pp(k, "")} => #{PP.singleline_pp(object[k], "")})
end.join(",\n")
when String
- object
+ object.inspect
else
PP.pp(object,"")
end
@@ -20,6 +20,10 @@ def description
"include#{expected_to_sentence}"
end
+ def diffable?
+ true
+ end
+
private
def perform_match(predicate, hash_predicate, actuals, expecteds)
Oops, something went wrong.

0 comments on commit 119e018

Please sign in to comment.