module TestRunner::BacktraceFilter
Public Instance Methods
call(trace)
click to toggle source
# File lib/test_runner/backtrace_filter.rb, line 5 def call trace return trace unless Config.trim_backtraces entry_point = trace.last test_runner_root = File.expand_path "../..", __FILE__ first_pass = trace.drop_while do |location| full_path = File.expand_path location.to_s full_path.start_with? test_runner_root end second_pass = first_pass.take_while do |location| full_path = File.expand_path location.to_s not full_path.start_with? test_runner_root end second_pass << entry_point unless second_pass.last == entry_point second_pass end