Class: Cucumber::Filters::Retry

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/filters/retry.rb

Instance Method Summary collapse

Constructor Details

#initialize(*_args) ⇒ Retry

Returns a new instance of Retry.



10
11
12
13
# File 'lib/cucumber/filters/retry.rb', line 10

def initialize(*_args)
  super
  @total_permanently_failed = 0
end

Instance Method Details

#test_case(test_case) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/cucumber/filters/retry.rb', line 15

def test_case(test_case)
  configuration.on_event(:test_case_finished) do |event|
    next unless retry_required?(test_case, event)

    test_case_counts[test_case] += 1
    test_case.describe_to(receiver)
  end

  super
end