Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix AM tests

  • Loading branch information...
commit 0448247e556357bda1d5e0d8a4263ef8dc20eb37 1 parent 0cbf9b2
@josevalim josevalim authored
Showing with 12 additions and 6 deletions.
  1. +12 −6 actionmailer/test/i18n_with_controller_test.rb
View
18 actionmailer/test/i18n_with_controller_test.rb
@@ -1,5 +1,6 @@
require 'abstract_unit'
require 'action_controller'
+require 'action_dispatch/testing/integration'
class I18nTestMailer < ActionMailer::Base
configure do |c|
@@ -15,6 +16,16 @@ def mail_with_i18n_subject(recipient)
end
class TestController < ActionController::Base
+ Routes = ActionDispatch::Routing::RouteSet.new
+
+ Routes.draw do
+ match ':controller(/:action(/:id))'
+ end
+
+ def self._routes
+ Routes
+ end
+
def send_mail
I18nTestMailer.mail_with_i18n_subject("test@localhost").deliver
render :text => 'Mail sent'
@@ -22,13 +33,8 @@ def send_mail
end
class ActionMailerI18nWithControllerTest < ActionDispatch::IntegrationTest
- Routes = ActionDispatch::Routing::RouteSet.new
- Routes.draw do
- match ':controller(/:action(/:id))'
- end
-
def app
- Routes
+ TestController::Routes
end
def setup
Please sign in to comment.
Something went wrong with that request. Please try again.