Presumably if Cucumber is not seeing what I expect it to see, it must be seeing something else. Mirroring in my application what I think the same steps are, I get the desired output.
This is a "signing in" feature. It appears that sign in is failing in the test. But unless I can see the error message, I don't know why it's failing!
Cucumber has a step called "show me the page" that works great! You can put it right where you want to view the page in your tests, like so:
When I go to the sign in page
Then show me the page # saves the HTML of that page and opens the file
And I sign in as "email@person.com/password"
Then I should see "Bad email or password"
And I should be signed out
I believe you need the launchy gem to make this work. Here's an article that describes it, along with other cool cucumber tricks:
http://robots.thoughtbot.com/post/189412598/five-ridiculously-awesome-cucumber-and-webrat
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.