test i18n against a routed app

This commit is contained in:
Aaron Patterson 2014-07-07 15:08:12 -07:00
parent 1e7f28c985
commit e0c6b35dac
1 changed files with 16 additions and 1 deletions

View File

@ -28,8 +28,23 @@ class ActionMailerI18nWithControllerTest < ActionDispatch::IntegrationTest
get ':controller(/:action(/:id))'
end
class RoutedRackApp
attr_reader :routes
def initialize(routes, &blk)
@routes = routes
@stack = ActionDispatch::MiddlewareStack.new(&blk).build(@routes)
end
def call(env)
@stack.call(env)
end
end
APP = RoutedRackApp.new(Routes)
def app
Routes
APP
end
teardown do