Method: RSpec::Core::Example::ExecutionResult#example_skipped?

Defined in:
lib/rspec/core/example.rb

#example_skipped?Boolean

Returns 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 that were marked as :pending, which causes them to be run, and produces a :failed result if the example passes.

Returns:

  • (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 that were marked as :pending, which causes them to be run, and produces a :failed result if the example passes.


597
598
599
# File 'lib/rspec/core/example.rb', line 597

def example_skipped?
  status == :pending && !pending_exception
end