pat / combustion

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

`no implicit conversion of nil into String (TypeError)` with 1.2.0 #105

Closed ankane closed 4 years ago

ankane commented 4 years ago

Hi, Combustion is great. Thanks for creating it!

I just upgraded from 1.1.2 to 1.2.0 and am running into an error - no implicit conversion of nil into String (TypeError). It's happening with Rails 5.0, 5.1, 5.2, and 6.0 (haven't tested other versions). Here's the stack trace:

6: from /home/travis/.rvm/gems/ruby-2.6.3/gems/combustion-1.2.0/lib/combustion.rb:35:in `initialize!'
5: from /home/travis/.rvm/gems/ruby-2.6.3/gems/combustion-1.2.0/lib/combustion.rb:35:in `each'
4: from /home/travis/.rvm/gems/ruby-2.6.3/gems/combustion-1.2.0/lib/combustion.rb:35:in `block in initialize!'
3: from /home/travis/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in `require'
2: from /home/travis/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:257:in `load_dependency'
1: from /home/travis/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in `block in require'
/home/travis/.rvm/gems/ruby-2.6.3/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in `require': no implicit conversion of nil into String (TypeError)

Ref: https://travis-ci.org/github/ankane/lockbox/jobs/677089603

pat commented 4 years ago

Thanks for sending this through - seems like it's from you specifying active_job as one of the components to load, but Combustion hasn't had that added in (not for any good reason, just hadn't got around to it!). I'll try to get that fixed later today.

pat commented 4 years ago

This also means that previously Combustion handled components that weren't explicitly specified, and that does feel like the right way to do things, so I'll try to have the code return to that behaviour.

pat commented 4 years ago

Just pushed v1.3.0 which includes explicit ActiveJob support (along with ActionCable, ActionText and ActionMailbox, which also hadn't previously been explicitly loaded). Hopefully this gets your build passing again :)

ankane commented 4 years ago

1.3.0 works great - thanks for the quick response!