Permalink
Browse files

Switched to size from length.

  • Loading branch information...
1 parent fda60f6 commit f8e8d9226640a089c9db466f2237e151684a50df @jnunemaker committed Mar 24, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 README.rdoc
  2. +1 −1 test/test_custom_matcher.rb
View
@@ -107,7 +107,7 @@ Hate writing assertions? Need a little behavior-driven love in your tests? Then
custom_matcher :have do |receiver, matcher, args|
count = args[0]
something = matcher.chained_messages[0].name
- actual = receiver.send(something).length
+ actual = receiver.send(something).size
matcher.positive_failure_message = "Expected #{receiver} to have #{actual} #{something}, but found #{count} "
actual == count
end
@@ -123,7 +123,7 @@ def test_matcher_with_chained_messages
custom_matcher :have do |receiver, matcher, args|
count = args[0]
something = matcher.chained_messages[0].name
- actual = receiver.send(something).length
+ actual = receiver.send(something).size
matcher.positive_failure_message = "Expected #{receiver} to have #{actual} #{something}, but found #{count} "
actual == count
end

0 comments on commit f8e8d92

Please sign in to comment.