pat / combustion

Simple, elegant testing for Rails Engines
MIT License
707 stars 51 forks source link

Rails edge failure involving sprockets-rails #119

Closed jrochkind closed 2 years ago

jrochkind commented 2 years ago

Hi, I use combustion to test on multiple rails versions, including "edge" from main branch in Rails repo. So I notice quick when something breaks!

Up to you whether you want to support rails-edge or not, I'm just letting you know! You can treat it as a preview of what you'll eventually probably have to do for the next Rails pre-release, or an eventual Rails 7 final release.

Rails main branch no longer includes sprockets-rails as a dependency. Which means a Combustion.initialize! :all will raise LoadError: cannot load such file -- sprockets/railtie on this line:

https://github.com/pat/combustion/blob/40d5fd3c3e84e331d1b55b3bf1d306dcca33ae03/lib/combustion.rb#L24

Why doesn't Rails include sprockets-rails as a dependency? It means to make sprockets use optional, suggesting a new Gem as an alternative. See:

Workaround for use with present Combustion?

What should Combustion do for the long-run?

pat commented 2 years ago

Thanks for this report @jrochkind - sorry it took me a while to respond to both this and #120.

I've opted for your final option: Sprockets is no longer loaded by default when testing against Rails 7, and there's a note in the README. Thanks for doing all the research and making suggestions on how to resolve it, greatly appreciated! Fixes for both the issues are part of Combustion v1.3.4 :)