aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/i18n_with_controller_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-07-07 15:08:12 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-07-07 15:08:12 -0700
commite0c6b35dac32b6375c86d93e992a138dd627157e (patch)
treea6b64f030a46ff133b576777918d6cdb89bc3528 /actionmailer/test/i18n_with_controller_test.rb
parent1e7f28c985b8df78058403f6ee5df42427ccc8c1 (diff)
downloadrails-e0c6b35dac32b6375c86d93e992a138dd627157e.tar.gz
rails-e0c6b35dac32b6375c86d93e992a138dd627157e.tar.bz2
rails-e0c6b35dac32b6375c86d93e992a138dd627157e.zip
test i18n against a routed app
Diffstat (limited to 'actionmailer/test/i18n_with_controller_test.rb')
-rw-r--r--actionmailer/test/i18n_with_controller_test.rb17
1 files changed, 16 insertions, 1 deletions
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