Class: Spec::Runner::Formatter::SpecdocFormatter
- Inherits:
-
BaseTextFormatter
- Object
- BaseFormatter
- BaseTextFormatter
- Spec::Runner::Formatter::SpecdocFormatter
- Defined in:
- lib/spec/runner/formatter/specdoc_formatter.rb
Instance Attribute Summary
Attributes inherited from BaseTextFormatter
Attributes inherited from BaseFormatter
#example_group, #options, #where
Instance Method Summary collapse
- #add_example_group(example_group) ⇒ Object
- #example_failed(example, counter, failure) ⇒ Object
- #example_passed(example) ⇒ Object
- #example_pending(example, message, pending_caller) ⇒ Object
Methods inherited from BaseTextFormatter
#close, #colorize_failure, #colourise, #dump_failure, #dump_pending, #dump_summary, #format_backtrace, #initialize
Methods inherited from BaseFormatter
#close, #dump_failure, #dump_pending, #dump_summary, #example_started, #initialize, #start, #start_dump
Constructor Details
This class inherits a constructor from Spec::Runner::Formatter::BaseTextFormatter
Instance Method Details
#add_example_group(example_group) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/spec/runner/formatter/specdoc_formatter.rb', line 7 def add_example_group(example_group) super output.puts output.puts example_group.description output.flush end |
#example_failed(example, counter, failure) ⇒ Object
14 15 16 17 |
# File 'lib/spec/runner/formatter/specdoc_formatter.rb', line 14 def example_failed(example, counter, failure) output.puts(red("- #{example.description} (FAILED - #{counter})")) output.flush end |
#example_passed(example) ⇒ Object
19 20 21 22 23 |
# File 'lib/spec/runner/formatter/specdoc_formatter.rb', line 19 def example_passed(example) = "- #{example.description}" output.puts green() output.flush end |
#example_pending(example, message, pending_caller) ⇒ Object
25 26 27 28 29 |
# File 'lib/spec/runner/formatter/specdoc_formatter.rb', line 25 def example_pending(example, , pending_caller) super output.puts yellow("- #{example.description} (PENDING: #{})") output.flush end |