This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Apr 21 21:59:06 -0700 2008 | [uhlenbrock] |
| |
LICENSE | Mon Apr 21 21:59:06 -0700 2008 | [uhlenbrock] |
| |
README | Mon Apr 21 21:59:06 -0700 2008 | [uhlenbrock] |
| |
Rakefile | Mon Apr 21 21:59:06 -0700 2008 | [uhlenbrock] |
| |
lib/ | Mon Apr 21 21:59:06 -0700 2008 | [uhlenbrock] |
README
== BodyMatcher
BodyMatcher simplifies your view testing. Forget assert_select.
Activate it by including it in your Test::Unit::TestCase class:
class Test::Unit::TestCase
include BodyMatcher
self.use_transactional_fixtures = true
self.use_instantiated_fixtures = false
end
Simple assertions:
body['#web_results'].should.match /results from the web/i
body['#categories_dropdown'].should.include "#{topic}[#{count}]"
Access the attributes:
body['#name_field'].attributes['value'].should.equal '(your name)'
body['#name_field']['value'].should.equal '(your name)'
You can also use @response.body['blah'].
The nice part about this is that test failures will print out only
the HTML you're trying to match.
For use with test/spec/rails, which provides the `body' method. Also
requires Hpricot. Enjoy.
* Chris Wanstrath [ chris@ozmm.org ]




