aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
Diffstat (limited to 'guides/source')
-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