Permalink
Browse files

doc patch for before statements

  • Loading branch information...
1 parent 3d6fc7d commit 650ec229322a60e88ab7e07c2bb01040fadf8d07 @croaky croaky committed Sep 30, 2008
Showing with 3 additions and 6 deletions.
  1. +3 −6 lib/shoulda/context.rb
View
@@ -73,24 +73,21 @@ def should(name, options = {}, &blk)
# == Before statements
#
- # Before statements are simply should statements that run before the current
+ # Before statements are should statements that run before the current
# context's setup. These are especially useful when setting expectations.
#
# === Example:
#
- # class UserControllerTest << Test::Unit::TestCase
+ # class UserControllerTest < Test::Unit::TestCase
# context "the index action" do
# setup do
# @users = [Factory(:user)]
# User.stubs(:find).returns(@users)
# end
#
# context "on GET" do
- # setup do
- # get :index
- # end
+ # setup { get :index }
#
- # # normal should statement
# should_respond_with :success
#
# # runs before "get :index"

0 comments on commit 650ec22

Please sign in to comment.