Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ActiveSupport::TestCase for Tracker tests #50940

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

skipkayhil
Copy link
Member

Minitest::Test does not support all of the same options as ActiveSupport::TestCase, such as running bin/test : 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

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
```
@rails-bot rails-bot bot added the actionview label Feb 1, 2024
@yahonda yahonda merged commit 1c2529b into rails:main Feb 1, 2024
4 checks passed
@skipkayhil skipkayhil deleted the hm-use-as-test-case branch February 1, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants