Method: RSpec::Core::ExampleGroup.xspecify

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

.xspecifyvoid .xspecify(&example_implementation) ⇒ void .xspecify(doc_string, *metadata) ⇒ void .xspecify(doc_string, *metadata, &example_implementation) ⇒ void

Shortcut to define an example with :skip => 'Temporarily skipped with xspecify'.

Examples:

xspecify do
end

xspecify "does something" do
end

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

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

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

Overloads:

  • .xspecify(&example_implementation) ⇒ void

    Parameters:

    • example_implementation (Block)

      The implementation of the example.

  • .xspecify(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.

  • .xspecify(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]

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

define_example_method :xspecify, :skip => 'Temporarily skipped with xspecify'