123456789_123456789_123456789_123456789_123456789_

Class: Minitest::BacktraceFilterWithFallback

Relationships & Source Files
Inherits: Object
Defined in: railties/lib/minitest/rails_plugin.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new(preferred, fallback) ⇒ BacktraceFilterWithFallback

[ GitHub ]

  
# File 'railties/lib/minitest/rails_plugin.rb', line 9

def initialize(preferred, fallback)
  @preferred = preferred
  @fallback = fallback
end

Instance Method Details

#filter(backtrace)

[ GitHub ]

  
# File 'railties/lib/minitest/rails_plugin.rb', line 14

def filter(backtrace)
  filtered = @preferred.filter(backtrace)
  filtered = @fallback.filter(backtrace) if filtered.empty?
  filtered
end