aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorZachary Scott <e@zzak.io>2014-12-22 10:12:06 -0500
committerZachary Scott <e@zzak.io>2014-12-22 10:12:06 -0500
commitcd01f9f9c5df06f74e1acdb55f0c6e5110ea0daf (patch)
tree16c517fc8bb09d854f83baadf89c44f16add6a7e /guides
parenteb93e70263dd6cdd212a7264abc58f542ffd9a25 (diff)
downloadrails-cd01f9f9c5df06f74e1acdb55f0c6e5110ea0daf.tar.gz
rails-cd01f9f9c5df06f74e1acdb55f0c6e5110ea0daf.tar.bz2
rails-cd01f9f9c5df06f74e1acdb55f0c6e5110ea0daf.zip
Add subheadings for these sections [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/testing.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index c913e9d98c..65c88303de 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -262,6 +262,8 @@ This will run all test methods from the test case.
The `.` (dot) above indicates a passing test. When a test fails you see an `F`; when a test throws an error you see an `E` in its place. The last line of the output is the summary.
+#### Your first failing test
+
To see how a test failure is reported, you can add a failing test to the `article_test.rb` test case.
```ruby
@@ -324,6 +326,8 @@ Finished tests in 0.047721s, 20.9551 tests/s, 20.9551 assertions/s.
Now, if you noticed, we first wrote a test which fails for a desired functionality, then we wrote some code which adds the functionality and finally we ensured that our test passes. This approach to software development is referred to as _Test-Driven Development_ (TDD).
+#### What an error looks like
+
To see how an error gets reported, here's a test containing an error:
```ruby