Class: Qcumberless::Formatter
- Inherits:
-
Cucumber::Formatter::Pretty
- Object
- Cucumber::Formatter::Pretty
- Qcumberless::Formatter
- Defined in:
- lib/qcumberless/formatter.rb
Instance Method Summary collapse
- #after_table_row(table_row) ⇒ Object
- #before_outline_table(outline_table) ⇒ Object
- #before_step(step) ⇒ Object
- #before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) ⇒ Object
- #before_table_row(table_row) ⇒ Object
Instance Method Details
#after_table_row(table_row) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/qcumberless/formatter.rb', line 41 def after_table_row(table_row) unless @header_row if table_row.exception @io.printf("\nStep failed: ".indent(@scenario_indent + 2)) @io.printf(table_row.exception) @io.printf("\n") @io.flush elsif table_row.status == :undefined @io.printf("\nStep failed: Step undefined\n".indent(@scenario_indent + 2)) @io.flush end end @header_row = false if @header_row super end |
#before_outline_table(outline_table) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/qcumberless/formatter.rb', line 26 def before_outline_table(outline_table) @io.printf("Outline table\n".indent(@scenario_indent + 2)) @io.flush @header_row = true super end |
#before_step(step) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/qcumberless/formatter.rb', line 5 def before_step( step ) @io.printf("Step: ".indent(@scenario_indent + 2)) @io.printf(step.name) @io.printf "\n" @io.flush super end |
#before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/qcumberless/formatter.rb', line 13 def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) if exception @io.printf("Step failed: ".indent(@scenario_indent + 2)) @io.printf(exception) @io.printf("\n") # @io.flush elsif status == :undefined @io.printf("Step failed: Step undefined\n".indent(@scenario_indent + 2)) # @io.flush end super end |
#before_table_row(table_row) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/qcumberless/formatter.rb', line 33 def before_table_row(table_row) @io.printf("Table row: ".indent(@scenario_indent + 2)) @io.printf(table_row.name) @io.printf "\n" @io.flush super end |