Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit a58e1ae

Browse files
committed
Fix predicates to return actual true/false values.
1 parent d9e7d3d commit a58e1ae

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/rspec/core/example.rb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,13 @@ def example_group
231231
@example_group_class
232232
end
233233

234-
alias_method :pending?, :pending
235-
alias_method :skipped?, :skip
234+
def pending?
235+
!!pending
236+
end
237+
238+
def skipped?
239+
!!skip
240+
end
236241

237242
# @api private
238243
# instance_execs the block passed to the constructor in the context of
@@ -577,7 +582,9 @@ class ExecutionResult
577582
# this indicates whether or not it now passes.
578583
attr_accessor :pending_fixed
579584

580-
alias pending_fixed? pending_fixed
585+
def pending_fixed?
586+
!!pending_fixed
587+
end
581588

582589
# @return [Boolean] Indicates if the example was completely skipped
583590
# (typically done via `:skip` metadata or the `skip` method). Skipped examples

0 commit comments

Comments
 (0)