Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActionView::TestCase does not have current url context so url_for will fail for hashed options

#1561

In testing my helpers, I discovered a nil.rewrite exception due to ActionController::Base.initialize_current_url not being called. This occurs when using url_for with a hash as arguments.

Attached is a patch to ActionView::TestCase which should resolve this issue

Reported by Dan Pickett · December 11th, 2008 @ 03:57 PM

State: resolved
Milestone: 2.x
Assigned to: josh josh
Importance: none

Activity

  1. Matt Jankowski
    Matt Jankowski

    +1

    It would be great to have some version of ActionView::TestCase which did not have to be patched in test_helper to work correctly when testing url_for and friends.

    December 11th, 2008 @ 04:29 PM

  2. josh
    josh
    • Assigned user set to josh

    December 15th, 2008 @ 05:43 PM

  3. Repository
    Repository
    • State changed from new to resolved

    (from [38412ecb5daa1826574ad0f132d23dc2ef4288bf]) Fixed ActionView::TestCase current url context [#1561 ActionView::TestCase does not have current url context so url_for will fail f... state:resolved] Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...

    December 15th, 2008 @ 05:49 PM