pat / combustion

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

Proposal for combustion to load less of Rails. #29

Closed parndt closed 11 years ago

parndt commented 11 years ago

@pat I would suggest that you create a gem called combustion-rails which loads the full stack automatically but this allows applications that don't already use all of Rails' heavy stack to continue to do so.

Here is how I'd use this in my library:

# Gemfile
group :test do
  gem 'combustion'
  gem 'activerecord'
end
# spec_helper.rb
Bundler.require :default, :test

Combustion.initialize! :active_record

This allows me to only load active record and not railties, actionpack, activeresource, sprockets, actionmailer which significantly improves CI time and reduces download time when bundling. It also means that I'm testing a truer version of what my library requires without accidentally including other parts of Rails that I specifically didn't want.

What do you think? :-)

pat commented 11 years ago

Phil, I think your head's in this space much more than mine is at the moment. I'm happy to give you commit rights, if you'd like? And if you want to create combustion-rails, be my guest. I'm not fussed if it's under my name (for consistency) or yours (for initiative) - but if the former, let me know and I'll create the repo and add you to that one too.

parndt commented 11 years ago

Thanks - it makes sense to put it under yours - makes it more official :-)