diff options
author | Yoshiyuki Hirano <yhirano@me.com> | 2017-12-06 09:09:32 +0900 |
---|---|---|
committer | Yoshiyuki Hirano <yhirano@me.com> | 2017-12-06 09:09:32 +0900 |
commit | 5f7fd1584f131d0afad558eaba6017e08df65892 (patch) | |
tree | 152dd7b3889c6ec51d37b9f8b8296c8fd801e25e | |
parent | 4c4d092431f45471f90badb81eaa2011843cc39b (diff) | |
download | rails-5f7fd1584f131d0afad558eaba6017e08df65892.tar.gz rails-5f7fd1584f131d0afad558eaba6017e08df65892.tar.bz2 rails-5f7fd1584f131d0afad558eaba6017e08df65892.zip |
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
-rw-r--r-- | guides/source/testing.md | 2 |
1 files changed, 2 insertions, 0 deletions
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`.| |