Class: Spec::Runner::QuietBacktraceTweaker

Class | Spec::Runner::QuietBacktraceTweaker
In: | lib/spec/runner/backtrace_tweaker.rb
Parent: | BacktraceTweaker

Tweaks raised Exceptions to mask noisy (unneeded) parts of the backtrace

### Methods

tweak_backtrace

### Constants

IGNORE_PATTERNS | = | spec_files + [ /\/lib\/ruby\//, /bin\/spec:/, /bin\/rcov:/, /lib\/rspec_on_rails/, /vendor\/rails/, # TextMate's Ruby and RSpec plugins /Ruby\.tmbundle\/Support\/tmruby.rb:/, /RSpec\.tmbundle\/Support\/lib/, /temp_textmate\./, /mock_frameworks\/rspec/, /spec_server/

### Public Instance methods

tweak_backtrace(error)

[Source]

        # File lib/spec/runner/backtrace_tweaker.rb, line 41
    41:       def tweak_backtrace(error)
    42:         return if error.backtrace.nil?
    43:         error.backtrace.collect! do |line|
    44:           clean_up_double_slashes(line)
    45:           IGNORE_PATTERNS.each do |ignore|
    46:             if line =~ ignore
    47:               line = nil
    48:               break
    49:             end
    50:           end
    51:           line
    52:         end
    53:         error.backtrace.compact!
    54:       end

[Validate]