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:



32
33
34
# File 'lib/rails/backtrace_cleaner.rb', line 32

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

Instance Method Details

#filter_backtrace_with_cleaning(backtrace, prefix = nil) ⇒ Object



36
37
38
39
40
# File 'lib/rails/backtrace_cleaner.rb', line 36

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