Class: Spec::Runner::Formatter::SpreadsheetFormatter
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- Spec::Runner::Formatter::SpreadsheetFormatter
- Defined in:
- lib/rasta/formatter/spreadsheet_formatter.rb
Constant Summary collapse
- GREEN =
35
- RED =
40
- YELLOW =
19
- NONE =
-4142
Instance Method Summary collapse
- #cell=(c) ⇒ Object
- #example_failed(example, counter, failure) ⇒ Object
- #example_passed(example) ⇒ Object
Instance Method Details
#cell=(c) ⇒ Object
11 12 13 |
# File 'lib/rasta/formatter/spreadsheet_formatter.rb', line 11 def cell=(c) @cell = c end |
#example_failed(example, counter, failure) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/rasta/formatter/spreadsheet_formatter.rb', line 15 def example_failed(example, counter, failure) if @cell failure.exception.backtrace ? @cell.color = YELLOW : @cell.color = RED comment = "method: " + @cell.header + "()\n" comment += failure.exception..gsub(/,\s+/,",\n") comment += "\n" + failure.exception.backtrace.join("\n") if failure.exception.backtrace @cell.comment = comment end end |