Allows assert_redirected_to to accept a regular expression #3792

wants to merge 1 commit into


None yet
3 participants

alindeman commented Nov 29, 2011

I have a few places where I really only care to assert that the URL matches a regular expression.

This patch allows it while keeping the semantics the same when a String or Hash is passed to assert_redirect_to

@vijaydev vijaydev and 1 other commented on an outdated diff Nov 29, 2011
@@ -54,14 +54,17 @@ module ActionDispatch
# # assert that the redirection was to the url for @customer
# assert_redirected_to @customer
+ # # asserts that the redirection matches the regular expression
+ # assert_redirect_to %r(^

vijaydev Nov 29, 2011


must be assert_redirected_to


alindeman Nov 29, 2011


Thanks: fixed and updated pull request.


alindeman commented Dec 1, 2011

Squashed and rebased.


alindeman commented Jan 18, 2012

Is this acceptable at all?


sikachu commented Apr 28, 2012

Going to bring this one up a notch. Can you please rebase your pull request, as it's not cleanly merge, adding CHANGELOG entry for this, maybe adding guide where appropriate, and force push the commit to your branch? Thanks a bunch.


alindeman commented Apr 29, 2012

Thanks. I'll do it over the next few days.


alindeman commented May 3, 2012

Unfortunately I had deleted my branch. Opened a new request at #6135.

alindeman closed this May 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment