Reputation: 251
I'm using omniauth and cucumber with a new application. I've got omniauth up and working and am trying to add appropriate cucumber feature tests. I kept running into odd errors in testing - errors that I don't get when performing the same steps manually.
Via "show me the page" I've narrowed it down to the fact that when cucumber does anything it's doing it via a file path (e.g., file:///path/to/app/tmp/capybara/capybara-201107151148029152254898.html
) instead of an http path (e.g., http://localhost:3000/
).
Why would my cucumber tests go through file paths instead of http paths; and how do I fix this situation?
Upvotes: 0
Views: 625
Reputation: 13663
I can only guess that Capybara implements "show me the page" as the following steps:
I assume your tests are hitting your application just fine using HTTP. (You can always verify that by looking at your logfiles.) But "show me the page" cannot simply open the URL it was testing because its content might change from request to request.
Example: A test posts a comment by POSTing to /comments
. If that fails for any reason and Capybara would open /comments
(the URL that raised the exception), it would issue a GET request and couldn't present you the content it saw.
Upvotes: 1