Skip to content

Commit

Permalink
fixed typo in test method name
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev authored and fxn committed Dec 11, 2010
1 parent b4b6ffe commit ab88074
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions railties/guides/source/testing.textile
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class PostTest < ActiveSupport::TestCase
The +PostTest+ class defines a _test case_ because it inherits from +ActiveSupport::TestCase+. +PostTest+ thus has all the methods available from +ActiveSupport::TestCase+. You'll see those methods a little later in this guide.

<ruby>
def test_truth
def test_the_truth
</ruby>

Any method defined within a +Test::Unit+ test case that begins with +test+ (case sensitive) is simply called a test. So, +test_password+, +test_valid_password+ and +testValidPassword+ all are legal test names and are run automatically when the test case is run.
Expand Down Expand Up @@ -257,7 +257,7 @@ This will run all the test methods from the test case.
You can also run a particular test method from the test case by using the +-n+ switch with the +test method name+.

<shell>
$ ruby unit/post_test.rb -n test_truth
$ ruby -Itest test/unit/post_test.rb -n test_the_truth

Loaded suite unit/post_test
Started
Expand Down Expand Up @@ -381,7 +381,7 @@ There are a bunch of different types of assertions you can use. Here's the compl
|+assert( boolean, [msg] )+ |Ensures that the object/expression is true.|
|+assert_equal( obj1, obj2, [msg] )+ |Ensures that +obj1 == obj2+ is true.|
|+assert_not_equal( obj1, obj2, [msg] )+ |Ensures that +obj1 == obj2+ is false.|
|+assert_same( obj1, obj2, [msg] )+ |Ensures that +obj1.equal?(obj2)+ is true.|
|+assert_same( obj1, obj2, [msg] )+ |Ensures that +obj1.equal?(obj2)+ is true.|
|+assert_not_same( obj1, obj2, [msg] )+ |Ensures that +obj1.equal?(obj2)+ is false.|
|+assert_nil( obj, [msg] )+ |Ensures that +obj.nil?+ is true.|
|+assert_not_nil( obj, [msg] )+ |Ensures that +obj.nil?+ is false.|
Expand Down

0 comments on commit ab88074

Please sign in to comment.