Module: RSpec::Longrun::DSL

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

Defined Under Namespace

Classes: NullStepFormatter

Instance Method Summary collapse

Instance Method Details

#step(description) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/rspec/longrun/dsl.rb', line 5

def step(description)
  rspec_longrun_formatter.step_started(description)
  ok = false
  begin
    yield if block_given?
    rspec_longrun_formatter.step_finished
    ok = true
  ensure
    rspec_longrun_formatter.step_failed unless ok
  end
end

#xstep(description) ⇒ Object



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

def xstep(description)
  rspec_longrun_formatter.step_started(description)
  rspec_longrun_formatter.step_pending
end