Closed CodeMonkeySteve closed 13 years ago
Hey Steve, do you get any errors when requiring the rspec/cells file before the environment? Here it works just fine, but maybe I am forgetting something. So, do we really need the Railtie?
This version shouldn't be compatible with Rails 2 since they use Rspec-1. We want Rspec-2!
Thanks so far, keep up the good work!
Well, I was getting errors about Rails.configuration being nil, which makes sense if the environment hasn't been loaded. But now I can't replicate that error at all, so I guess you can ignore this request entirely. Weird ...
This is really weird. I was confused since rspec-rails doesn't use Railties at all. Isn't there any gem where we can look up the "right" way? ;-)
[bdimcheff] found out that my approach leads to problems when using with Capybara, and your fix works, so you again commited. Thanks, Steve!
rspec/rails must be required after config/environment (i.e. in spec_helper), as it relies on Rails.configuration being set, so it can't be loaded in 'rspec-cells'. Renamed to 'rspec/cells', following the rspec-rails convention.
I wasn't sure if the master branch was intended to be backward-compatible with rails2, so I created this branch with a Railtie to automatically load 'rspec/rails' at initialization time.