Skip to content

Commit 3a3ef7c

Browse files
committed
Use ActiveSupport::TestCase for Tracker tests
Minitest::Test does not support all of the same options as ActiveSupport::TestCase, such as running bin/test <filename>:<lineno> and -n /regex/. Trying to use these options on this file would just run all of the Minitest::Tests no matter what options were passed. This commit fixes the ability to use those options by using ActiveSupport::TestCase (like every other test in the repo). Before: ``` $ bin/test test/template/dependency_tracker_test.rb:217 Running 59 tests in parallel using 8 processes Run options: --seed 42725 ......................................................... Finished in 0.322759s, 176.6024 runs/s, 176.6024 assertions/s. 57 runs, 57 assertions, 0 failures, 0 errors, 0 skips ``` After: ``` $ bin/test test/template/dependency_tracker_test.rb:217 Running 59 tests in parallel using 8 processes Run options: --seed 15213 ... Finished in 0.359162s, 8.3528 runs/s, 8.3528 assertions/s. 3 runs, 3 assertions, 0 failures, 0 errors, 0 skips ```
1 parent 7c1db8d commit 3a3ef7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

actionview/test/template/dependency_tracker_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def test_dependencies_with_interpolation
225225
end
226226
end
227227

228-
class ERBTrackerTest < Minitest::Test
228+
class ERBTrackerTest < ActiveSupport::TestCase
229229
include SharedTrackerTests
230230

231231
def make_tracker(name, template)
@@ -266,7 +266,7 @@ def test_dependencies_skip_commented_out_renders
266266
end
267267
end
268268

269-
class RipperRubyTrackerTest < Minitest::Test
269+
class RipperRubyTrackerTest < ActiveSupport::TestCase
270270
include SharedTrackerTests
271271
include RubyTrackerTests
272272

@@ -275,7 +275,7 @@ def parser_class
275275
end
276276
end
277277

278-
class PrismRubyTrackerTest < Minitest::Test
278+
class PrismRubyTrackerTest < ActiveSupport::TestCase
279279
include SharedTrackerTests
280280
include RubyTrackerTests
281281

0 commit comments

Comments
 (0)