aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/test_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/application/test_test.rb')
-rw-r--r--railties/test/application/test_test.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/test/application/test_test.rb b/railties/test/application/test_test.rb
index 37175783d8..de316a6fd0 100644
--- a/railties/test/application/test_test.rb
+++ b/railties/test/application/test_test.rb
@@ -23,6 +23,23 @@ module ApplicationTests
run_test 'unit/foo_test.rb'
end
+ # Run just in Ruby < 1.9
+ if defined?(Test::Unit::Util::BacktraceFilter)
+ test "adds backtrace cleaner" do
+ app_file 'test/unit/backtrace_test.rb', <<-RUBY
+ require 'test_helper'
+
+ class FooTest < ActiveSupport::TestCase
+ def test_truth
+ assert Test::Unit::Util::BacktraceFilter.ancestors.include?(Rails::BacktraceFilterForTestUnit)
+ end
+ end
+ RUBY
+
+ run_test 'unit/backtrace_test.rb'
+ end
+ end
+
test "integration test" do
controller 'posts', <<-RUBY
class PostsController < ActionController::Base