This will make sure we have less tests to run since those are slow.
Generate the app once and run many assertions on it instead of generating
the same app multiple times.
Since we are stubbing bundle commands, we can avoid sprockets side-effects here.
This commit also fixes the tests for preservation of sprockets during `app:update`.
Due to propshaft being the default, this test was unnecessary.
Since 27285e7881 the special case for this gem was removed from the
codebase.
So changed this test to be about where we expect to find the
session stores.
This will avoid a warning about circular dependencies.
/circular require considered harmful.*rails-html-sanitizer/
This happens because `rails-html-sanitizer` requires `action_view/helpers`
that requires `action_view/helpers/sanitize_helper` that requires
`rails-html-sanitizer`.
I'll properly fix this in rails-html-sanitizer later removing the code
that needs to be added to ActionView::Helpers in that gem.
An action can _contain_ multiple renders/redirects, but only one can be _performed_.
"Attempting to try to" is redundant.
Also removes the `and return` recommendation in order to be consistent with the documentation updates from https://github.com/rails/rails/pull/45927
The gemspec doesn't include files with the `.` prefix, so the released
gem didn't include the devcontainer templates. This commit renames the
folder to avoid the `.` prefix, following the same pattern as all
the other `.` templates.
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
```
The `transaction.active_record` event is about transactions. Let's
first document the transaction object, then the transaction state,
and finally the connection in case you need more context.
Checking explicitly against `test` break extensions that provide their
own methods to generate tests, like `minitest-spec-rails` or `minitest-rails`.
Fixes#51956
The usage of `dispatch` in all logging methods causes common usages such
as `logger.info` to return an array of loggers, making it unsafe for an
application to upgrade to Rails 7.1.
Returning `nil` is more efficient, and is the default behavior when
using `Logger`.