rspec/rspec-rails — pull request #539 by danrasband (2012-05-10 21:25:13+00:00)
Title: Added configuration to allow for custom application engine.

After seeing the pull request at https://github.com/rspec/rspec-rails/pull/471, I took it upon myself to push this along.

I've replicated the changes made in the above pull request, adding a few more changes for consistency, and also included tests.

To rehash what is in the above pull request, basically it makes it possible to run controller, mailer, requests, and routing specs when your site uses a rails engine to handle its routing. So, if you're using an engine like Spree, for example, you can add the following to your spec_helper.rb:

```ruby
RSpec.configure do |config|
config.application = MyApp::Engine
end
```

or, in the case of Spree:

```ruby
RSpec.configure do |config|
config.application = Spree::Core::Engine
end
```

Please let me know if you need any more information or if more work needs to be done.