aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/testing.md
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-04-05 15:46:41 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-04-05 15:46:41 -0700
commit32eff659bc92895546e3d5f90ef76051f0e7b6cd (patch)
tree784860e8442273be6b12881af2c4d7472b30c5d4 /guides/source/testing.md
parentc7a148f389a9aebd8b0f71b4de3672321bb523cc (diff)
downloadrails-32eff659bc92895546e3d5f90ef76051f0e7b6cd.tar.gz
rails-32eff659bc92895546e3d5f90ef76051f0e7b6cd.tar.bz2
rails-32eff659bc92895546e3d5f90ef76051f0e7b6cd.zip
just use ruby to run tests
Diffstat (limited to 'guides/source/testing.md')
-rw-r--r--guides/source/testing.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 858d4d2334..9432369571 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -236,7 +236,7 @@ Finished tests in 0.009262s, 107.9680 tests/s, 107.9680 assertions/s.
You can also run a particular test method from the test case by running the test and using `-n` switch with the `test method name`.
```bash
-$ rake test test/models/post_test.rb TESTOPTS='-n test_the_truth'
+$ ruby -Itest test/models/post_test.rb -n test_the_truth
.
Finished tests in 0.009064s, 110.3266 tests/s, 110.3266 assertions/s.
@@ -260,7 +260,7 @@ end
Let us run this newly added test.
```bash
-$ rake test test/models/post_test.rb TESTOPTS='-n test_should_not_save_post_without_title'
+$ ruby -Itest test/models/post_test.rb -n test_should_not_save_post_without_title
F
Finished tests in 0.044632s, 22.4054 tests/s, 22.4054 assertions/s.
@@ -300,7 +300,7 @@ end
Now the test should pass. Let us verify by running the test again:
```bash
-$ rake test test/models/post_test.rb TESTOPTS='-n test_should_not_save_post_without_title'
+$ ruby -Itest test/models/post_test.rb -n test_should_not_save_post_without_title
.
Finished tests in 0.047721s, 20.9551 tests/s, 20.9551 assertions/s.
@@ -325,7 +325,7 @@ end
Now you can see even more output in the console from running the tests:
```bash
-$ rake test test/models/post_test.rb TESTOPTS='-n test_should_report_error'
+$ ruby -Itest test/models/post_test.rb -n test_should_report_error
E
Finished tests in 0.030974s, 32.2851 tests/s, 0.0000 assertions/s.