aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2017-12-06 09:21:54 -0500
committerGitHub <noreply@github.com>2017-12-06 09:21:54 -0500
commitce37e1643a62436a7c0ce059def4c5d9c72f7367 (patch)
treeea6a3eaf2dc96530ac79524589972c9b282ac6be /guides
parent23226d04f921b79f0077ba38c5a5a923b6d43f89 (diff)
parent5f7fd1584f131d0afad558eaba6017e08df65892 (diff)
downloadrails-ce37e1643a62436a7c0ce059def4c5d9c72f7367.tar.gz
rails-ce37e1643a62436a7c0ce059def4c5d9c72f7367.tar.bz2
rails-ce37e1643a62436a7c0ce059def4c5d9c72f7367.zip
Merge pull request #31345 from yhirano55/add_assert_in_epsilon_to_testing_guide
Add `assert_in_epsilon` to Testing guide [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/testing.md2
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`.|