File: shorted_backtrace.rb

package info (click to toggle)
ruby-maxitest 5.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 536 kB
  • sloc: ruby: 1,578; makefile: 7
file content (8 lines) | stat: -rw-r--r-- 217 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
Minitest::BacktraceFilter.send(:prepend, Module.new do
  def filter(*)
    backtrace = super
    pwd = "#{Dir.pwd}/"
    section = pwd.size..-1
    backtrace.map { |b| b.start_with?(pwd) ? b[section] : b }
  end
end)