diff options
Diffstat (limited to 'guides/source/testing.md')
-rw-r--r-- | guides/source/testing.md | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md index b2da25b19f..4ded7818b5 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -364,13 +364,8 @@ Ideally, you would like to include a test for everything which could possibly br By now you've caught a glimpse of some of the assertions that are available. Assertions are the worker bees of testing. They are the ones that actually perform the checks to ensure that things are going as planned. -There are a bunch of different types of assertions you can use. Here's an -extract of the -[assertions](http://docs.seattlerb.org/minitest/Minitest/Assertions.html) you -can use with [minitest](https://github.com/seattlerb/minitest), the default -testing library used by Rails. The `[msg]` parameter is an optional string -message you can specify to make your test failure messages clearer. It's not -required. +There are a bunch of different types of assertions you can use. +Here's an extract of the assertions you can use with [`Minitest`](https://github.com/seattlerb/minitest), the default testing library used by Rails. The `[msg]` parameter is an optional string message you can specify to make your test failure messages clearer. It's not required. | Assertion | Purpose | | ---------------------------------------------------------------- | ------- | @@ -406,6 +401,8 @@ required. | `assert_send( array, [msg] )` | Ensures that executing the method listed in `array[1]` on the object in `array[0]` with the parameters of `array[2 and up]` is true. This one is weird eh?| | `flunk( [msg] )` | Ensures failure. This is useful to explicitly mark a test that isn't finished yet.| +The above are subset of assertions that minitest supports. For an exhaustive & more up-to-date list, please check [Minitest API documentation](http://docs.seattlerb.org/minitest/), specifically [`Minitest::Assertions`](http://docs.seattlerb.org/minitest/Minitest/Assertions.html) + Because of the modular nature of the testing framework, it is possible to create your own assertions. In fact, that's exactly what Rails does. It includes some specialized assertions to make your life easier. NOTE: Creating your own assertions is an advanced topic that we won't cover in this tutorial. |