This project is archived and is in readonly mode.

#3439 ✓invalid
Nathaniel Bibler

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

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>

People watching this ticket

Pages