diff options
Diffstat (limited to 'railties/test/application/test_test.rb')
-rw-r--r-- | railties/test/application/test_test.rb | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/railties/test/application/test_test.rb b/railties/test/application/test_test.rb index 27a7959e84..f6bcaa466a 100644 --- a/railties/test/application/test_test.rb +++ b/railties/test/application/test_test.rb @@ -1,7 +1,7 @@ require 'isolation/abstract_unit' module ApplicationTests - class TestTest < Test::Unit::TestCase + class TestTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup @@ -24,24 +24,7 @@ module ApplicationTests end RUBY - 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 + run_test_file 'unit/foo_test.rb' end test "integration test" do @@ -66,7 +49,7 @@ module ApplicationTests end RUBY - run_test 'integration/posts_test.rb' + run_test_file 'integration/posts_test.rb' end test "performance test" do @@ -91,11 +74,11 @@ module ApplicationTests end RUBY - run_test 'performance/posts_test.rb' + run_test_file 'performance/posts_test.rb' end private - def run_test(name) + def run_test_file(name) result = ruby '-Itest', "#{app_path}/test/#{name}" assert_equal 0, $?.to_i, result end |