From 04e1281990fd1d18d95c6b609690380711d0b48a Mon Sep 17 00:00:00 2001 From: Gaurish Sharma Date: Sun, 13 Jul 2014 02:28:25 +0530 Subject: Add link to minitest rdoc & github --- guides/source/testing.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/testing.md b/guides/source/testing.md index 561fe2cf70..a416cd36b5 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -365,7 +365,7 @@ 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 you can use with `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. +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 | | ---------------------------------------------------------------- | ------- | @@ -395,6 +395,8 @@ Here's an extract of the assertions you can use with `minitest`, the default tes | `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. -- cgit v1.2.3