Skip to content

Commit

Permalink
readme formatting fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker authored and mcmire committed Feb 7, 2010
1 parent 777a144 commit ca329ee
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions README.rdoc
Expand Up @@ -52,8 +52,6 @@ Hate writing assertions? Need a little behavior-driven love in your tests? Then
# passes if @obj.something? is true

* a lot more ...

* Get the speed of Test:Unit with the syntax of RSpec

* Create your own custom matchers

Expand Down Expand Up @@ -107,12 +105,12 @@ Hate writing assertions? Need a little behavior-driven love in your tests? Then
# Even more advanced, you can have messages on matchers
class Test::Unit::TestCase
custom_matcher :have do |receiver, matcher, args|
count = args[0]
something = matcher.chained_messages[0].name
actual = receiver.send(something).length
matcher.positive_failure_message = "Expected #{receiver} to have #{actual} #{something}, but found #{count} "
actual == count
end
count = args[0]
something = matcher.chained_messages[0].name
actual = receiver.send(something).length
matcher.positive_failure_message = "Expected #{receiver} to have #{actual} #{something}, but found #{count} "
actual == count
end
end

class MoreAdvancedTest < Test::Unit::TestCase
Expand Down

0 comments on commit ca329ee

Please sign in to comment.