Closed jonleighton closed 12 years ago
I ever so slightly lean towards assert_equal
as this would be one less thing to mentally juggle on what could be a "new concept" for someone. For me assert_redirected_to
implies a bit more of the application stack. So assert_equal
to me makes sense in the Unit test, assert_redirected_to makes sense in the Integration test.
Oops, referenced the wrong issue in that commit.
I think I will leave this actually, because being able to write e.g. assert_redirected_to @post
can be useful. There is already a response.location
method that can be asserted, anyway.
Look into whether it's possible/practical to remove e.g.
assert_redirected_to foo
in favour ofassert_equal foo, response.redirected_url
.