Skip to content

Commit

Permalink
doc patch for before statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Croak committed Sep 30, 2008
1 parent 3d6fc7d commit 650ec22
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/shoulda/context.rb
Expand Up @@ -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"
Expand Down

0 comments on commit 650ec22

Please sign in to comment.