Last Updated: February 25, 2016
·
736
· prototypealex

Routes in Modules

If you're trying to rspec routes in modules, add:

# spec_helper.rb
config.include Rails.application.routes.url_helpers

to your spec helper, and:

# test.rb
routes.default_url_options = { :host => 'test.host' }

to your test.rb environment. :)