Class: RSpec::Core::ExampleGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/by/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#by(message, level = 0) ⇒ Object Also known as: and_by



30
31
32
33
34
35
36
37
38
# File 'lib/rspec/by/core_ext.rb', line 30

def by message, level=0
  pending(message) unless block_given?
  begin
    @by_reporter.by_started(message)
    yield
  ensure
    @by_reporter.by_ended
  end
end