In order to test whether the controller correctly raises the error or not, I've conducted the following test:
Taro wrote:
Now, puts shows that the flash[:notice] is set to the correct error message in the controller, but for some reason, it's reseted to nil in the test! More oddly, the first test works with similar procedures, yet the second doesn't.... Why is that? Is it due to my redirect statement?
You shouldn't really be making more that one request in a test (if you really have to recreating the controller/request/response objects would probably do the trick
Fred
...I didn't exactly understand what you meant, but I think I can change the tests a bit to make it work as you say.