Class: Cucumber::Formatter::Rerun
- Includes:
- Io
- Defined in:
- lib/cucumber/formatter/rerun.rb
Instance Method Summary collapse
- #after_test_case(test_case, result) ⇒ Object
- #done ⇒ Object
-
#initialize(runtime, path_or_io, options) ⇒ Rerun
constructor
A new instance of Rerun.
Methods included from Io
#ensure_dir, #ensure_file, #ensure_io
Constructor Details
#initialize(runtime, path_or_io, options) ⇒ Rerun
Returns a new instance of Rerun.
8 9 10 11 |
# File 'lib/cucumber/formatter/rerun.rb', line 8 def initialize(runtime, path_or_io, ) @io = ensure_io(path_or_io, "rerun") @failures = {} end |
Instance Method Details
#after_test_case(test_case, result) ⇒ Object
13 14 15 16 17 |
# File 'lib/cucumber/formatter/rerun.rb', line 13 def after_test_case(test_case, result) return if result.passed? @failures[test_case.location.file] ||= [] @failures[test_case.location.file] << test_case.location.line end |
#done ⇒ Object
19 20 21 22 |
# File 'lib/cucumber/formatter/rerun.rb', line 19 def done return if @failures.empty? @io.print file_failures.join(' ') end |