Class: Spec::Runner::Formatter::FailingExampleGroupsFormatter

Inherits:
BaseTextFormatter show all
Defined in:
lib/gems/rspec-1.1.12/lib/spec/runner/formatter/failing_example_groups_formatter.rb

Instance Attribute Summary

Attributes inherited from BaseTextFormatter

#output, #pending_examples

Attributes inherited from BaseFormatter

#example_group, #options, #where

Instance Method Summary collapse

Methods inherited from BaseTextFormatter

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

Methods inherited from BaseFormatter

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

#dump_failure(counter, failure) ⇒ Object



19
20
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/formatter/failing_example_groups_formatter.rb', line 19

def dump_failure(counter, failure)
end

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



22
23
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/formatter/failing_example_groups_formatter.rb', line 22

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

#example_failed(example, counter, failure) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/formatter/failing_example_groups_formatter.rb', line 7

def example_failed(example, counter, failure)
  if @example_group
    description_parts = @example_group.description_parts.collect do |description|
      description =~ /(.*) \(druby.*\)$/ ? $1 : description
    end
    @output.puts ::Spec::Example::ExampleGroupMethods.description_text(*description_parts)

    @output.flush
    @example_group = nil
  end
end