Skip to content
Browse files

Get ActionMailer's tests passing with the non global router

  • Loading branch information...
1 parent a278f23 commit 1fb2c6f63527408c8dbb00d6483ee6cf677db2df Carlhuda committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 actionmailer/test/old_base/url_test.rb
View
6 actionmailer/test/old_base/url_test.rb
@@ -4,8 +4,10 @@
class WelcomeController < ActionController::Base
end
+AppRoutes = ActionDispatch::Routing::RouteSet.new
+
class ActionMailer::Base
- include ActionController::UrlFor
+ include AppRoutes.named_url_helpers
end
class TestMailer < ActionMailer::Base
@@ -61,7 +63,7 @@ def teardown
def test_signed_up_with_url
TestMailer.delivery_method = :test
- ActionDispatch::Routing::Routes.draw do |map|
+ AppRoutes.draw do |map|
map.connect ':controller/:action/:id'
map.welcome 'welcome', :controller=>"foo", :action=>"bar"
end

0 comments on commit 1fb2c6f

Please sign in to comment.
Something went wrong with that request. Please try again.