Permalink
Browse files

Fix AM tests

  • Loading branch information...
1 parent 0cbf9b2 commit 0448247e556357bda1d5e0d8a4263ef8dc20eb37 @josevalim josevalim committed Jan 31, 2011
Showing with 12 additions and 6 deletions.
  1. +12 −6 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,20 +16,25 @@ 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'
end
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

0 comments on commit 0448247

Please sign in to comment.