From e0c6b35dac32b6375c86d93e992a138dd627157e Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 7 Jul 2014 15:08:12 -0700 Subject: test i18n against a routed app --- actionmailer/test/i18n_with_controller_test.rb | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'actionmailer/test/i18n_with_controller_test.rb') diff --git a/actionmailer/test/i18n_with_controller_test.rb b/actionmailer/test/i18n_with_controller_test.rb index 2863d60a16..ee36b89dd6 100644 --- a/actionmailer/test/i18n_with_controller_test.rb +++ b/actionmailer/test/i18n_with_controller_test.rb @@ -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 -- cgit v1.2.3