Class: Spec::Runner::Formatter::RdocFormatter

Inherits:
BaseTextFormatter show all
Defined in:
lib/spec/runner/formatter/rdoc_formatter.rb

Instance Attribute Summary

Attributes inherited from BaseTextFormatter

#dry_run

Instance Method Summary collapse

Methods inherited from BaseTextFormatter

#close, #colour=, #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_behaviour(name) ⇒ Object



5
6
7
# File 'lib/spec/runner/formatter/rdoc_formatter.rb', line 5

def add_behaviour(name)
  @output.puts "# #{name}"
end

#example_failed(example, counter, failure) ⇒ Object



14
15
16
# File 'lib/spec/runner/formatter/rdoc_formatter.rb', line 14

def example_failed(example, counter, failure)
  @output.puts "# * #{example.description} [#{counter} - FAILED]"
end

#example_passed(example) ⇒ Object



9
10
11
12
# File 'lib/spec/runner/formatter/rdoc_formatter.rb', line 9

def example_passed(example)
  @output.puts "# * #{example.description}"
  @output.flush
end

#example_pending(behaviour_name, example_name, message) ⇒ Object



18
19
20
# File 'lib/spec/runner/formatter/rdoc_formatter.rb', line 18

def example_pending(behaviour_name, example_name, message)
  @output.puts "# * #{behaviour_name} #{example_name} [PENDING: #{message}]"
end