Get Railties tests passing
This commit is contained in:
parent
1fb2c6f635
commit
9a5be2e5a8
@ -6,7 +6,7 @@ class Railtie < Rails::Railtie
|
||||
railtie_name :action_mailer
|
||||
|
||||
initializer "action_mailer.url_for", :before => :load_environment_config do |app|
|
||||
ActionMailer::Base.send(:include, ActionController::UrlFor) if defined?(ActionController)
|
||||
ActionMailer::Base.send(:include, app.routes.named_url_helpers)
|
||||
end
|
||||
|
||||
require "action_mailer/railties/log_subscriber"
|
||||
|
@ -48,7 +48,7 @@ def require_environment!
|
||||
end
|
||||
|
||||
def routes
|
||||
::ActionDispatch::Routing::Routes
|
||||
@routes ||= ActionDispatch::Routing::RouteSet.new
|
||||
end
|
||||
|
||||
def railties
|
||||
|
@ -18,6 +18,9 @@ def setup
|
||||
match ':controller/:action'
|
||||
end
|
||||
@controller.stubs(:consider_all_requests_local? => false, :local_request? => true)
|
||||
@router = Rails.application.routes
|
||||
|
||||
Rails::InfoController.send(:include, @router.named_url_helpers)
|
||||
end
|
||||
|
||||
test "info controller does not allow remote requests" do
|
||||
|
Loading…
Reference in New Issue
Block a user