Class: Spec::Runner::Formatter::SpecdocFormatter

Inherits:
BaseTextFormatter show all
Defined in:
lib/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb

Instance Attribute Summary

Attributes inherited from BaseTextFormatter

#example_group, #output

Instance Method Summary collapse

Methods inherited from BaseTextFormatter

#close, #colorize_failure, #colourise, #dump_failure, #dump_pending, #dump_summary, #format_backtrace, #initialize

Methods inherited from BaseFormatter

#add_example_group, #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

#example_failed(example, counter, failure) ⇒ Object



14
15
16
17
# File 'lib/vendor/plugins/rspec/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_group_started(example_group) ⇒ Object



7
8
9
10
11
12
# File 'lib/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb', line 7

def example_group_started(example_group)
  super
  output.puts
  output.puts example_group.description
  output.flush
end

#example_passed(example) ⇒ Object



19
20
21
22
23
# File 'lib/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb', line 19

def example_passed(example)
  message = "- #{example.description}"
  output.puts green(message)
  output.flush
end

#example_pending(example, message, deprecated_pending_location = nil) ⇒ Object



25
26
27
28
29
# File 'lib/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb', line 25

def example_pending(example, message, deprecated_pending_location=nil)
  super
  output.puts yellow("- #{example.description} (PENDING: #{message})")
  output.flush
end