Added clarification to README

Signed-off-by: Nick Quaranto <nick@quaran.to>
This commit is contained in:
Sean Schofield 2009-05-27 13:58:39 -04:00 committed by Nick Quaranto
parent c53e720363
commit fdb4b5135e
1 changed files with 14 additions and 12 deletions

View File

@ -75,22 +75,24 @@ Makes TDD so much easier.
=== Controller Tests (Shoulda::Controller::Macros) === Controller Tests (Shoulda::Controller::Macros)
Macros to test the most common controller patterns... Macros to test the most common controller patterns...
class PostsControllerTest < ActionController::TestCase
context "on GET to :show for first record" do
setup do
get :show, :id => 1
end
context "on GET to :show for first record" do should_assign_to :user
setup do should_respond_with :success
get :show, :id => 1 should_render_template :show
end should_not_set_the_flash
should_assign_to :user should "do something else really cool" do
should_respond_with :success assert_equal 1, assigns(:user).id
should_render_template :show end
should_not_set_the_flash
should "do something else really cool" do
assert_equal 1, assigns(:user).id
end end
end end
=== Helpful Assertions (Shoulda::Assertions) === Helpful Assertions (Shoulda::Assertions)
More to come here, but have fun with what's there. More to come here, but have fun with what's there.