From f9382cd7948c75a9ca0772ee2795699577b06d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 6 Jan 2012 15:54:22 -0300 Subject: [PATCH] Test::Unit::Util::BacktraceFilter is never defined --- railties/lib/rails/test_help.rb | 5 ----- railties/test/backtrace_cleaner_test.rb | 28 ------------------------- 2 files changed, 33 deletions(-) diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index 1b5ab549be..0b2842837f 100644 --- a/railties/lib/rails/test_help.rb +++ b/railties/lib/rails/test_help.rb @@ -7,11 +7,6 @@ require 'active_support/test_case' require 'action_controller/test_case' require 'action_dispatch/testing/integration' -if defined?(Test::Unit::Util::BacktraceFilter) && ENV['BACKTRACE'].nil? - require 'rails/backtrace_cleaner' - Test::Unit::Util::BacktraceFilter.module_eval { include Rails::BacktraceFilterForTestUnit } -end - if defined?(MiniTest) # Enable turn if it is available begin diff --git a/railties/test/backtrace_cleaner_test.rb b/railties/test/backtrace_cleaner_test.rb index 80077378db..cbe7d35f6d 100644 --- a/railties/test/backtrace_cleaner_test.rb +++ b/railties/test/backtrace_cleaner_test.rb @@ -1,34 +1,6 @@ require 'abstract_unit' require 'rails/backtrace_cleaner' -if defined? Test::Unit::Util::BacktraceFilter - class TestWithBacktrace - include Test::Unit::Util::BacktraceFilter - include Rails::BacktraceFilterForTestUnit - end - - class BacktraceCleanerFilterTest < ActiveSupport::TestCase - def setup - @test = TestWithBacktrace.new - @backtrace = [ './test/rails/benchmark_test.rb', './test/rails/dependencies.rb', '/opt/local/lib/ruby/kernel.rb' ] - end - - test "test with backtrace should use the rails backtrace cleaner to clean" do - Rails.stubs(:backtrace_cleaner).returns(stub(:clean)) - Rails.backtrace_cleaner.expects(:clean).with(@backtrace, nil) - @test.send(:filter_backtrace, @backtrace) - end - - test "filter backtrace should have the same arity as Test::Unit::Util::BacktraceFilter" do - assert_nothing_raised do - @test.send(:filter_backtrace, @backtrace, '/opt/local/lib') - end - end - end -else - $stderr.puts 'No BacktraceFilter for minitest' -end - if defined? Gem class BacktraceCleanerVendorGemTest < ActiveSupport::TestCase def setup