Method: RSpec::Core::ExampleGroup.skip

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

.skipvoid .skip(&example_implementation) ⇒ void .skip(doc_string, *metadata) ⇒ void .skip(doc_string, *metadata, &example_implementation) ⇒ void

Shortcut to define an example with :skip => true

Examples:

skip do
end

skip "does something" do
end

skip "does something", :slow, :uses_js do
end

skip "does something", :with => 'additional metadata' do
end

skip "does something" do |ex|
  # ex is the Example object that contains metadata about the example
end

Overloads:

  • .skip(&example_implementation) ⇒ void

    Parameters:

    • example_implementation (Block)

      The implementation of the example.

  • .skip(doc_string, *metadata) ⇒ void

    Parameters:

    • doc_string (String)

      The example's doc string.

    • metadata (Array<Symbol>, Hash)

      Metadata for the example. Symbols will be transformed into hash entries with true values.

  • .skip(doc_string, *metadata, &example_implementation) ⇒ void

    Parameters:

    • doc_string (String)

      The example's doc string.

    • metadata (Array<Symbol>, Hash)

      Metadata for the example. Symbols will be transformed into hash entries with true values.

    • example_implementation (Block)

      The implementation of the example.

Yields:

See Also:

[View source]

195
# File 'lib/rspec/core/example_group.rb', line 195

define_example_method :skip,     :skip => true