aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-09-14 20:07:29 +0200
committerXavier Noria <fxn@hashref.com>2010-09-14 20:07:29 +0200
commitdd6efe98b62946ae4d4df0672292449226b8d6fc (patch)
tree8854f46462eacc6355ca6f8da3d7111a57e036ea /railties/guides
parent9362ef6e21e44341a5ef9d85ece468f407357ceb (diff)
parentb59a8d42c300651ad3384d4dab326454c088cbcc (diff)
downloadrails-dd6efe98b62946ae4d4df0672292449226b8d6fc.tar.gz
rails-dd6efe98b62946ae4d4df0672292449226b8d6fc.tar.bz2
rails-dd6efe98b62946ae4d4df0672292449226b8d6fc.zip
Merge remote branch 'docrails/master'
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/testing.textile7
1 files changed, 3 insertions, 4 deletions
diff --git a/railties/guides/source/testing.textile b/railties/guides/source/testing.textile
index 6686dc3290..2355d2a31a 100644
--- a/railties/guides/source/testing.textile
+++ b/railties/guides/source/testing.textile
@@ -241,8 +241,7 @@ h4. Running Tests
Running a test is as simple as invoking the file containing the test cases through Ruby:
<shell>
-$ cd test
-$ ruby unit/post_test.rb
+$ ruby -Itest test/unit/post_test.rb
Loaded suite unit/post_test
Started
@@ -252,12 +251,12 @@ Finished in 0.023513 seconds.
1 tests, 1 assertions, 0 failures, 0 errors
</shell>
-This will run all the test methods from the test case.
+This will run all the test methods from the test case. Note that +test_helper.rb+ is in the +test+ directory, hence this directory needs to be added to the load path using the +-I+ switch.
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_truth
Loaded suite unit/post_test
Started