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

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\./

Public Instance methods

[Source]

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

[Validate]