Class: Spec::Runner::Formatter::FailingBehavioursFormatter

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

Instance Attribute Summary

Attributes inherited from BaseTextFormatter

#dry_run

Instance Method Summary collapse

Methods inherited from BaseTextFormatter

#close, #colour=, #colourise, #dump_pending, #example_pending, #format_backtrace, #initialize

Methods inherited from BaseFormatter

#close, #dump_pending, #example_passed, #example_pending, #example_started, #initialize, #start, #start_dump

Constructor Details

This class inherits a constructor from Spec::Runner::Formatter::BaseTextFormatter

Instance Method Details

#add_behaviour(behaviour_name) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/spec/runner/formatter/failing_behaviours_formatter.rb', line 5

def add_behaviour(behaviour_name)
  if behaviour_name =~ /(.*) \(druby.*\)$/
    @behaviour_name = $1
  else
    @behaviour_name = behaviour_name
  end
end

#dump_failure(counter, failure) ⇒ Object



21
22
# File 'lib/spec/runner/formatter/failing_behaviours_formatter.rb', line 21

def dump_failure(counter, failure)
end

#dump_summary(duration, example_count, failure_count, pending_count) ⇒ Object



24
25
# File 'lib/spec/runner/formatter/failing_behaviours_formatter.rb', line 24

def dump_summary(duration, example_count, failure_count, pending_count)
end

#example_failed(example, counter, failure) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/spec/runner/formatter/failing_behaviours_formatter.rb', line 13

def example_failed(example, counter, failure)
  unless @behaviour_name.nil?
    @output.puts @behaviour_name 
    @behaviour_name = nil
    @output.flush
  end
end