File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
rspec-expectations/lib/rspec/expectations Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -208,13 +208,20 @@ def on_potential_false_positives=(behavior)
208
208
# Configures RSpec to check predicate matchers to `be(true)` / `be(false)` (strict),
209
209
# or `be_truthy` / `be_falsey` (not strict).
210
210
# Historically, the default was `false`, but `true` is recommended.
211
- def strict_predicate_matchers = ( flag )
212
- raise ArgumentError , "Pass `true` or `false`" unless flag == true || flag == false
213
- @strict_predicate_matchers = flag
214
- end
215
-
211
+ #
212
+ # @overload strict_predicate_matchers
213
+ # @return [Boolean]
214
+ # @overload strict_predicate_matchers?
215
+ # @return [Boolean]
216
+ # @overload strict_predicate_matchers=(value)
217
+ # @param [Boolean] value
216
218
attr_reader :strict_predicate_matchers
217
219
220
+ def strict_predicate_matchers = ( value )
221
+ raise ArgumentError , "Pass `true` or `false`" unless value == true || value == false
222
+ @strict_predicate_matchers = value
223
+ end
224
+
218
225
def strict_predicate_matchers?
219
226
@strict_predicate_matchers
220
227
end
You can’t perform that action at this time.
0 commit comments