Named Routes in ActionView Scope Don't Respect AC::Base#default_url_options

I have the following test case in url_helper_test.rb (test patch for reference should be attached)

   def test_named_route_should_show_host_and_path_using_controller_default_url_options
     class << @controller
       def default_url_options(options = nil)
         {:host => 'testtwo.host'}
       end
     end

     with_url_helper_routing do
       get :show_named_route, :kind => ‘url’
       assert_equal ‘http://testtwo.host/url_helper_with_controller/show_named_route’, @response.body
     end
   end

This fails, while similar test (in the second patch file) against action controller directly seem to work ok.

Is this expected behavior?

-- Tom + Chris Roos

0001-Added-failing-test-case.patch (1.18 KB)

0002-Added-a-second-test-case-that-passes.-This-one-uses.patch (1.94 KB)

This fails, while similar test (in the second patch file) against
action controller directly seem to work ok.

Is this expected behavior?

This isn't consistent with what I see in an application I'm working on
at present. Could you please open a lighthouse ticket with these
patches / test cases attached so people can investigate a little more.

This isn't consistent with what I see in an application I'm working on
at present. Could you please open a lighthouse ticket with these
patches / test cases attached so people can investigate a little more.

Second that. And could you add the output of the failure as well?

Cheers,
Eloy

Ticket raised: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1301

Also have a patch to fix it too... just not 100% sure it's the best
thing to do.

Thanks in advance guys!