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
13 14 |
# File 'lib/kelbim/rspec-formatter.rb', line 13 def dump_backtrace(example) end |
#dump_commands_to_rerun_failed_examples ⇒ Object
16 17 |
# File 'lib/kelbim/rspec-formatter.rb', line 16 def dump_commands_to_rerun_failed_examples end |
#dump_failure_info(example) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/kelbim/rspec-formatter.rb', line 3 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
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/kelbim/rspec-formatter.rb', line 19 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 |