Open jjb opened 10 years ago
I saw the same here. My assumption was that expect ... redirect_to
is actually using assert
deep down under the hood, since I get the same exact error when I try to call any of the "old guard" assert matchers like assert_redirected_to
after including Wrong.
I interpret this to mean that once you install Wrong, you must use its DSL exclusively; it may break any of the old assertion styles. If that's necessary for it to do the magic it does, then that's fine, but I wonder if that warning could be made clearer in the readme? Or even better, perhaps there's an option I don't know about to name the assert
method something different, so it doesn't clobber everything that depends on the old assert
?
EDIT: It just occurred to me that adding the TestUnit and/or MiniTest adapters might help here, though I don't have the time to test this at the moment.
require 'wrong/adapters/test_unit'
I have this spec:
Run with everything but the last line, it succeeds. But with the last line, this happens:
It's as if
alias_assert :expect
is being invoked, but just for that one spec.I've experimented with different combinations and orderings and determined that the problem only happens when
redirect_to
is present.Any ideas?