Skip to content

Commit f57c60b

Browse files
authored
Merge pull request #178 from github/abraham-patch-1
compare_error => compare_errors
2 parents 7ae1859 + c579a33 commit f57c60b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class MyWidget
109109
end
110110
```
111111

112-
If either the control block or candidate block raises an error, Scientist compares the two observations' classes and messages using `==`. To override this behavior, use `compare_error` to define how to compare observed errors instead:
112+
If either the control block or candidate block raises an error, Scientist compares the two observations' classes and messages using `==`. To override this behavior, use `compare_errors` to define how to compare observed errors instead:
113113

114114
```ruby
115115
class MyWidget
@@ -132,7 +132,7 @@ class MyWidget
132132
candidate.message.start_with?("Invalid characters in input")
133133
end
134134

135-
e.compare_error do |control, candidate|
135+
e.compare_errors do |control, candidate|
136136
compare_error_message_and_class.call(control, candidate) ||
137137
compare_argument_errors.call(control, candidate)
138138
end
@@ -260,7 +260,7 @@ def admin?(user)
260260
end
261261
```
262262

263-
The ignore blocks are only called if the *values* don't match. Unless a `compare_error` comparator is defined, two cases are considered mismatches: a) one observation raising an exception and the other not, b) observations raising exceptions with different classes or messages.
263+
The ignore blocks are only called if the *values* don't match. Unless a `compare_errors` comparator is defined, two cases are considered mismatches: a) one observation raising an exception and the other not, b) observations raising exceptions with different classes or messages.
264264

265265
### Enabling/disabling experiments
266266

0 commit comments

Comments
 (0)