Class: Spec::Runner::Formatter::TextMateFormatter
- Inherits:
-
HtmlFormatter
- Object
- BaseFormatter
- BaseTextFormatter
- HtmlFormatter
- Spec::Runner::Formatter::TextMateFormatter
- Defined in:
- lib/spec/runner/formatter/text_mate_formatter.rb
Overview
Formats backtraces so they’re clickable by TextMate
Instance Attribute Summary
Attributes inherited from BaseTextFormatter
Attributes inherited from BaseFormatter
#example_group, #options, #where
Instance Method Summary collapse
Methods inherited from HtmlFormatter
#add_example_group, #dump_failure, #dump_summary, #example_failed, #example_group_number, #example_number, #example_passed, #example_pending, #example_started, #extra_failure_content, #global_scripts, #global_styles, #html_header, #initialize, #method_missing, #move_progress, #percent_done, #report_header, #start, #start_dump
Methods inherited from BaseTextFormatter
#close, #colorize_failure, #colourise, #dump_failure, #dump_pending, #dump_summary, #example_pending, #format_backtrace, #initialize
Methods inherited from BaseFormatter
#add_example_group, #close, #dump_failure, #dump_pending, #dump_summary, #example_failed, #example_passed, #example_pending, #example_started, #initialize, #start, #start_dump
Constructor Details
This class inherits a constructor from Spec::Runner::Formatter::HtmlFormatter
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Spec::Runner::Formatter::HtmlFormatter
Instance Method Details
#backtrace_line(line) ⇒ Object
8 9 10 11 12 |
# File 'lib/spec/runner/formatter/text_mate_formatter.rb', line 8 def backtrace_line(line) line.gsub(/([^:]*\.rb):(\d*)/) do "<a href=\"txmt://open?url=file://#{File.($1)}&line=#{$2}\">#{$1}:#{$2}</a> " end end |