From 345e0b274cb384f8d453256e90dd105e6c2ffa19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 7 Feb 2010 13:44:47 +0100 Subject: Add backtrace cleaner on test unit railtie. --- railties/lib/rails/test_unit/railtie.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb index 21b9dbc074..f7f07ac053 100644 --- a/railties/lib/rails/test_unit/railtie.rb +++ b/railties/lib/rails/test_unit/railtie.rb @@ -13,5 +13,13 @@ module Rails rake_tasks do load "rails/test_unit/testing.rake" end + + initializer "test_unit.backtrace_cleaner" do + # TODO: Figure out how to get the Rails::BacktraceFilter into minitest/unit + unless defined?(Minitest) || ENV['BACKTRACE'] + require 'rails/backtrace_cleaner' + Test::Unit::Util::BacktraceFilter.module_eval { include Rails::BacktraceFilterForTestUnit } + end + end end end \ No newline at end of file -- cgit v1.2.3