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 12 |
# File 'lib/cucumber/formatter/rerun.rb', line 8 def initialize(runtime, path_or_io, ) @io = ensure_io(path_or_io) @failures = {} @options = end |
Instance Method Details
#after_test_case(test_case, result) ⇒ Object
14 15 16 17 18 |
# File 'lib/cucumber/formatter/rerun.rb', line 14 def after_test_case(test_case, result) return if result.ok?(@options[:strict]) @failures[test_case.location.file] ||= [] @failures[test_case.location.file] << test_case.location.line end |
#done ⇒ Object
20 21 22 23 |
# File 'lib/cucumber/formatter/rerun.rb', line 20 def done return if @failures.empty? @io.print file_failures.join(' ') end |