nikushi / minipack

Minipack, a gem for minimalists, which can integrates Rails with webpack. It is an alternative to Webpacker.
MIT License
115 stars 22 forks source link

Some tests fail with Rails 7 #44

Open anitagraham opened 2 years ago

anitagraham commented 2 years ago

The Prologue There is an ActionView configuration apply_stylesheet_media_default. At Rails 7 the default value has changed from 'true' to (3 gueses: Yes false). See Configuring Rails Applications.

The Action Minipack's tests assume that stylesheet_link_tag will always return a media value, but the change in default means this is not happening in Rails 7.

I have added a custom matcher which should compare the html, while ignoring the media attribute, but it's not working. It will ignore attributes by name or by css selector, but not if the attribute is completely missing from one of the fragments.

The Epilogue Other options?

P.S. As soon as i submitted this comment I turned around and did my testing on Rails 6 and all was well. However, Rails 7 awaits...