Class: Cucumber::Formatters::AutotestFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/formatters/autotest_formatter.rb

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ AutotestFormatter

Returns a new instance of AutotestFormatter.



6
7
8
9
# File 'lib/cucumber/formatters/autotest_formatter.rb', line 6

def initialize(io)
  @io = io
  @failed_scenarios = []
end

Instance Method Details

#step_didnt_pass(step, regexp, args) ⇒ Object Also known as: step_failed, step_pending, step_skipped



11
12
13
14
15
16
# File 'lib/cucumber/formatters/autotest_formatter.rb', line 11

def step_didnt_pass(step, regexp, args)
  unless @failed_scenarios.include? step.scenario.name
    @failed_scenarios << step.scenario.name
    @io.puts step.scenario.name
  end
end