diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-08-08 13:48:30 +0200 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-08-08 13:48:30 +0200 |
commit | 920ad94598a9b90d048cb7cb19a34d7cb9e80392 (patch) | |
tree | 77e016c3a03fc2ad0cf290e9e38f166b327c1622 /actionpack/lib/action_controller/test_case.rb | |
parent | 62d8a1c84406f8021c74a02fea320cf2fb129adf (diff) | |
parent | d2553c3409843986be2c00394687828195b913dc (diff) | |
download | rails-920ad94598a9b90d048cb7cb19a34d7cb9e80392.tar.gz rails-920ad94598a9b90d048cb7cb19a34d7cb9e80392.tar.bz2 rails-920ad94598a9b90d048cb7cb19a34d7cb9e80392.zip |
Merge branch 'master' of git@github.com:lifo/docrails
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index d50416272a..3e66947d5f 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -25,7 +25,7 @@ module ActionController # # Functional tests are written as follows: # 1. First, one uses the +get+, +post+, +put+, +delete+ or +head+ method to simulate - # an HTTP request. + # an HTTP request. # 2. Then, one asserts whether the current state is as expected. "State" can be anything: # the controller's HTTP response, the database contents, etc. # @@ -35,11 +35,11 @@ module ActionController # def test_create # # Simulate a POST response with the given HTTP parameters. # post(:create, :book => { :title => "Love Hina" }) - # + # # # Assert that the controller tried to redirect us to # # the created book's URI. # assert_response :found - # + # # # Assert that the controller really put the book in the database. # assert_not_nil Book.find_by_title("Love Hina") # end @@ -100,7 +100,7 @@ module ActionController @@controller_class = nil class << self - # Sets the controller class name. Useful if the name can't be inferred from test class. + # Sets the controller class name. Useful if the name can't be inferred from test class. # Expects +controller_class+ as a constant. Example: <tt>tests WidgetController</tt>. def tests(controller_class) self.controller_class = controller_class |