Module: Rails::BacktraceFilterForTestUnit

Defined in:
lib/rails/backtrace_cleaner.rb

Overview

For installing the BacktraceCleaner in the test/unit

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object

:nodoc:



44
45
46
# File 'lib/rails/backtrace_cleaner.rb', line 44

def self.included(klass)
  klass.send :alias_method_chain, :filter_backtrace, :cleaning
end

Instance Method Details

#filter_backtrace_with_cleaning(backtrace, prefix = nil) ⇒ Object



48
49
50
51
52
# File 'lib/rails/backtrace_cleaner.rb', line 48

def filter_backtrace_with_cleaning(backtrace, prefix=nil)
  backtrace = filter_backtrace_without_cleaning(backtrace, prefix)
  backtrace = backtrace.first.split("\n") if backtrace.size == 1
  Rails.backtrace_cleaner.clean(backtrace)
end