Closed jrochkind closed 6 years ago
Oh, duh. I need Combustion.initialize! :all
, not just Combustion.initialize!
with no args. Somehow I thought :all
was the default.
Now my tests are running... I'm getting failures I wasn't getting with Combustion.initialize! :active_record
, but that must be due to rails setting things up differently somehow.
Once upon a time specifying no arguments for Combustion.initialize!
meant load everything, but that was changed in 876512c700080a41058f7fa8b92a9391c5834d07 five years ago by @parndt. I think I'm mostly happy with the current behaviour - I like things to be a little more explicit.
I've been thinking of whether there any situation where having no arguments (and thus, loading no Rails components) would make sense… the only case would be where you want something that works with Rails, but doesn't make use of any of the active/action gems. Which is certainly valid! So, I'll keep things as they are for now.
In the process of trying to change my existing gem over to use combution. My tests run correctly when I do
Combustion.initialize! :active_record
. But when I try to switch over to justCombustion.initialize!
, so I can start adding integration tests that use other parts of rails, every access to the db results in aActiveRecord::ConnectionNotEstablished: No connection pool with 'primary' found.
Any ideas? I'm at a bit of a loss.
Example stack trace: