-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stub rails_command to prevent app:template command from being run
When #48269 was merged any gem installed during `rails new` which calls `app:template` would cause the install command to be executed and consequently `bundle install` would also run. We want to avoid running these commands in our tests because they are very expensive. It is up to the gem (importmap, etc) to test the behavior of the install command, not railties. Before ``` $ bin/test test/generators/plugin_generator_test.rb test/generators/app_generator_test.rb Finished in 320.803659s, 0.8541 runs/s, 7.1913 assertions/s. 274 runs, 2307 assertions, 14 failures, 0 errors, 0 skips ``` After ``` Finished in 70.316250s, 3.9251 runs/s, 34.3164 assertions/s. 276 runs, 2413 assertions, 0 failures, 0 errors, 0 skips ``` Change railties default log_level to :error The default of :info generates a ton of unnecessary noise in the railties logs. This change greatly reduces the amount of noise in the railties tests. **After** ``` $ bundle exec rake test >> railties_output_patched 2>&1 $ wc -l railties_output_patched 1491 railties_output_patched ``` **Before** ``` $ bundle exec rake test >> railties_output_unpatched 2>&1 $ wc -l railties_output_unpatched 19023 railties_output_unpatched ```
- Loading branch information
Showing
4 changed files
with
61 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters