Permalink
Browse files

Updated readme

  • Loading branch information...
1 parent 7792940 commit 2b0c7f88d668c524ea52f459c4f80270fb4a1fce Bobby Uhlenbrock committed Sep 8, 2008
Showing with 5 additions and 6 deletions.
  1. +5 −6 README.markdown
View
@@ -14,18 +14,17 @@ BodyMatcher simplifies your view testing. Forget assert_select.
## Simple assertions:
body_matcher['#web_results'].should.match /results from the web/i
-
- body_matcher['#categories_dropdown'].should.include "#{topic}[#{count}]"
+ body_matcher['#categories_dropdown'].should.include "#{topic}[#{count}]"
+
+ or
+
+ request.body.should.body_match '(your name)'
## Access the attributes:
body_matcher['#name_field'].attributes['value'].should.equal '(your name)'
body_matcher['#name_field']['value'].should.equal '(your name)'
- or
-
- request.body.should.body_match '(your name)'
-
The nice part about this is that test failures will print out only
the HTML you're trying to match.

0 comments on commit 2b0c7f8

Please sign in to comment.