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

Commit 77f54f1

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

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

lib/rspec/core/example.rb

Lines changed: 11 additions & 2 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
@@ -579,6 +584,10 @@ class ExecutionResult
579584

580585
alias pending_fixed? pending_fixed
581586

587+
def initialize
588+
@pending_fixed = false
589+
end
590+
582591
# @return [Boolean] Indicates if the example was completely skipped
583592
# (typically done via `:skip` metadata or the `skip` method). Skipped examples
584593
# will have a `:pending` result. A `:pending` result can also come from examples

0 commit comments

Comments
 (0)