Class: RSpec::Core::Formatters::TextMateFormatter
- Inherits:
-
HtmlFormatter
- Object
- BaseFormatter
- BaseTextFormatter
- HtmlFormatter
- RSpec::Core::Formatters::TextMateFormatter
- Defined in:
- lib/rspec/core/formatters/text_mate_formatter.rb
Overview
Formats backtraces so they’re clickable by TextMate
Constant Summary
Constants included from Helpers
Helpers::DEFAULT_PRECISION, Helpers::SUB_SECOND_PRECISION
Instance Attribute Summary
Attributes inherited from BaseFormatter
#duration, #example_count, #example_group, #examples, #failed_examples, #failure_count, #output, #pending_count, #pending_examples
Instance Method Summary collapse
Methods inherited from HtmlFormatter
#dump_failures, #dump_pending, #dump_summary, #example_failed, #example_group_number, #example_group_started, #example_number, #example_passed, #example_pending, #example_started, #extra_failure_content, #global_scripts, #global_styles, #html_header, #initialize, #message, #move_progress, #percent_done, #report_header, #start, #start_dump
Methods inherited from BaseTextFormatter
#close, #colorise_summary, #dump_failures, #dump_pending, #dump_profile, #dump_summary, #message, #summary_line
Methods inherited from BaseFormatter
#close, #dump_failures, #dump_pending, #dump_summary, #example_failed, #example_group_finished, #example_group_started, #example_passed, #example_pending, #example_started, #format_backtrace, #initialize, #message, #start, #start_dump, #stop
Methods included from Helpers
#format_seconds, #strip_trailing_zeroes
Constructor Details
This class inherits a constructor from RSpec::Core::Formatters::HtmlFormatter
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RSpec::Core::Formatters::HtmlFormatter
Instance Method Details
#backtrace_line(line) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/rspec/core/formatters/text_mate_formatter.rb', line 8 def backtrace_line(line) if line = super(line) line.sub!(/([^:]*\.e?rb):(\d*)/) do "<a href=\"txmt://open?url=file://#{File.($1)}&line=#{$2}\">#{$1}:#{$2}</a> " end line end end |