Skip to content

Commit

Permalink
Fix predicates to return actual true/false values.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcandre committed Sep 2, 2020
1 parent d9e7d3d commit 31ff6c9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/rspec/core/example.rb
Expand Up @@ -232,7 +232,10 @@ def example_group
end

alias_method :pending?, :pending
alias_method :skipped?, :skip

def skipped?
!!skip
end

# @api private
# instance_execs the block passed to the constructor in the context of
Expand Down Expand Up @@ -579,6 +582,10 @@ class ExecutionResult

alias pending_fixed? pending_fixed

def initialize
@pending_fixed = false
end

# @return [Boolean] Indicates if the example was completely skipped
# (typically done via `:skip` metadata or the `skip` method). Skipped examples
# will have a `:pending` result. A `:pending` result can also come from examples
Expand Down

0 comments on commit 31ff6c9

Please sign in to comment.