Class: Kelbim::RSpecFormatter
- Inherits:
-
RSpec::Core::Formatters::ProgressFormatter
- Object
- RSpec::Core::Formatters::ProgressFormatter
- Kelbim::RSpecFormatter
- Defined in:
- lib/kelbim/rspec-formatter.rb
Instance Method Summary collapse
- #dump_backtrace(example) ⇒ Object
- #dump_commands_to_rerun_failed_examples ⇒ Object
- #dump_failure_info(example) ⇒ Object
- #dump_pending ⇒ Object
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_examples ⇒ Object
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. line = exception..to_s.split("\n").first line.sub!(/\s*with backtrace:\s*/, '') output.puts "#{long_padding}#{failure_color(line)}" end end |
#dump_pending ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/kelbim/rspec-formatter.rb', line 22 def dump_pending unless pending_examples.empty? output.puts output.puts "Pending:" pending_examples.each do |pending_example| output.puts pending_color(" #{pending_example.full_description}") output.puts detail_color(" # #{pending_example.execution_result[:pending_message]}") end end end |