Add propshaft specs for railties new default#52122
Closed
tute wants to merge 12 commits intorails:mainfrom
Closed
Conversation
Create `sprockets_assets_test.rb` file that will contain the sprockets-specific tests of `assets_test.rb` (which in turn will contain the tests common to both pipelines). Generate new temporary directory for template app configured for the sprockets asset pipeline. Both `sprockets_assets_test.rb` and `assets_test.rb` files run fine independently, but when ran together, loading propshaft breaks `config.assets` for the Sprockets test. How could we run them together?
- Remove `.erb` extension - Change `asset_path` helper for `url` helper - Update manifest directory - Update hash key
… present in sprockets
Need to tell Propshaft proper URL or ask it's assembly for the proper digest (but that's already tested in the gem).
Contributor
Author
|
Pinging @rafaelfranca please about the question on railties for each library colliding with each other. Thank you! 💖 |
This was referenced Sep 12, 2024
Member
This happens if you simply I've wrapped up these tests and fixed the rest of propshaft tests based on #52887 in a new PR (#52899), thanks for your work on this! |
Contributor
Author
|
Oh I thought we had to load both for testing all files on a single test process. Thank you @zzak! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation / Background
In #51799 @dhh changed asset pipeline default to Propshaft in Rails 8; specs assumed sprockets though so the new default isn't being tested.
@fedesapuppo and I reconvert
test/application/assets_test.rbto test the propshaft default (dropping several sprockets-specific tests now unneeded), and duplicated the original file into atest/application/sprockets_assets_test.rbto continue testing that option. Both run fine independently, but loading them together leaves the propshaft railtie loaded for both versions, messing with the sprockets configuration and tests. How could we decouple them properly?Thanks to @rafaelfranca for helping us get started generating a template app for each asset pipeline option.
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]