This project is archived and is in readonly mode.
assert_redirected_to doesn't support regular expression matching
Reported by Nathaniel Bibler | October 29th, 2009 @ 03:44 PM
The assert_redirected_to
testing assertion does not
properly match against regular expressions. In fact, I'm currently
seeing the following error:
def test_redirect
get :index
assert_redirect_to %r{fubar}
end
# 1) Error:
# NoMethodError: undefined method `regexp_url' for #<FooController:0x111111>
I'll likely take a stab at a patch, shortly, just wanted to make the ticket.
Comments and changes to this ticket
-
David Trasbo April 14th, 2010 @ 09:29 PM
- Assigned user set to Ryan Bigg
Nathaniel,
According to the documentation of
assert_redirected_to
the method isn't supposed to support regular expressions - I think the error you're seeing is a side effect of that.If you think regular expressions should be supported please do post a ticket with a patch. This ticket, however, can be marked as invalid.
-
Ryan Bigg April 14th, 2010 @ 09:37 PM
- State changed from new to invalid
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>