Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobby Uhlenbrock committed Sep 8, 2008
1 parent 7792940 commit 2b0c7f8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.markdown
Expand Up @@ -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.

Expand Down

0 comments on commit 2b0c7f8

Please sign in to comment.