first, sorry for the bad english.
I have a test that submit a login form.
after redirect, when I test for a message ‘successfully logged…’
then my page.body is
'<h1>Not Found</h1>'
but this works perfectly on browser manual test.
what should I’m doing wrong?
Sounds likely that one of your steps is redirecting in a way that you do not expect.
Check your before filters on the controller and application_controller to determine whether a login/I18n filter is redirecting your page.
If you have the launchy gem installed, you can also add the following to your steps:
Which will fire-up a browser with what capybara is actually looking at, which is useful for sanity checking your steps.
Good luck!