Class: Kelbim::RSpecFormatter

Inherits:
RSpec::Core::Formatters::ProgressFormatter
  • Object
show all
Defined in:
lib/kelbim/rspec_formatter.rb

Instance Method Summary collapse

Instance Method Details

#dump_backtrace(example) ⇒ Object



16
17
# File 'lib/kelbim/rspec_formatter.rb', line 16

def dump_backtrace(example)
end

#dump_commands_to_rerun_failed_examplesObject



19
20
# File 'lib/kelbim/rspec_formatter.rb', line 19

def dump_commands_to_rerun_failed_examples
end

#dump_failure_info(example) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/kelbim/rspec_formatter.rb', line 6

def dump_failure_info(example)
  exception = example.execution_result[:exception]

  if exception.message
    line = exception.message.to_s.split("\n").first
    line.sub!(/\s*with backtrace:\s*/, '')
    output.puts "#{long_padding}#{failure_color(line)}"
  end
end