From 2b0c7f88d668c524ea52f459c4f80270fb4a1fce Mon Sep 17 00:00:00 2001 From: Bobby Uhlenbrock Date: Mon, 8 Sep 2008 11:23:26 -0400 Subject: [PATCH] Updated readme --- README.markdown | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.markdown b/README.markdown index 2ce4af7..15cd373 100644 --- a/README.markdown +++ b/README.markdown @@ -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.