Closed
Description
For testing controllers in an rails engine one can set the engine routes inside the controller spec file:
Great, but it is very tedious to set this in every single controller spec. Especially for large rails engines, like spree or alchemy.
It would be great if one could set the routes globally like this:
# spec_helper.rb
RSpec.configure do |config|
config.before(:each) do
# Load the routes for controller specs
if example.metadata[:type] == :controller
example.routes { Alchemy::Engine.routes }
end
end
end