From 5f7fd1584f131d0afad558eaba6017e08df65892 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Hirano Date: Wed, 6 Dec 2017 09:09:32 +0900 Subject: Add `assert_in_epsilon` to Testing guide [ci skip] I found `assert_in_epsilon` is not be in "2.4 Available Assertions". So I Added them. MiniTest::Assertions#assert_in_epsilon: https://github.com/seattlerb/minitest/blob/master/lib/minitest/assertions.rb#L204-L210 --- guides/source/testing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guides/source/testing.md b/guides/source/testing.md index e0a2d281d9..9692f50b6e 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -319,6 +319,8 @@ specify to make your test failure messages clearer. | `assert_not_includes( collection, obj, [msg] )` | Ensures that `obj` is not in `collection`.| | `assert_in_delta( expected, actual, [delta], [msg] )` | Ensures that the numbers `expected` and `actual` are within `delta` of each other.| | `assert_not_in_delta( expected, actual, [delta], [msg] )` | Ensures that the numbers `expected` and `actual` are not within `delta` of each other.| +| `assert_in_epsilon ( expected, actual, [epsilon], [msg] )` | Ensures that the numbers `expected` and `actual` have a relative error less than `epsilon`.| +| `assert_not_in_epsilon ( expected, actual, [epsilon], [msg] )` | Ensures that the numbers `expected` and `actual` don't have a relative error less than `epsilon`.| | `assert_throws( symbol, [msg] ) { block }` | Ensures that the given block throws the symbol.| | `assert_raises( exception1, exception2, ... ) { block }` | Ensures that the given block raises one of the given exceptions.| | `assert_instance_of( class, obj, [msg] )` | Ensures that `obj` is an instance of `class`.| -- cgit v1.2.3