Module: RSpec::Core::DSL

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

Overview

Adds the ‘describe` method to the top-level namespace.

Instance Method Summary collapse

Instance Method Details

#describe(*args, &example_group_block) ⇒ Object

Generates a subclass of [ExampleGroup](ExampleGroup)

## Examples:

describe "something" do
  it "does something" do
    # example code goes here
  end
end


17
18
19
# File 'lib/rspec/core/dsl.rb', line 17

def describe(*args, &example_group_block)
  RSpec::Core::ExampleGroup.describe(*args, &example_group_block).register
end