cucumber-api-steps
cucumber-api-steps copied to clipboard
host required
Hi,
In a Rails app using Capybara, in order to use the "I send a XXX request to…" step definitions, I needed to specify the host otherwise it would always 404. Therefore I now provide page.driver.send
with a fully-fledged path in the step definition. I did that the brutal way by adding the following piece of code in the step definition, before the final if/else
:
current_host = Capybara.app_host || Capybara.default_host
path = current_host + path
Capybara's internals (see Capybara::RackTest::Browser#process) feature a more subtle way of handling the issue.
Still, I am not sure how it should be fixed in cucumber-api-steps. Food for thoughts!
Hmm, I've not run into this one. What versions of Rails and Capybara are you on?
Rails 3.2.9 and Capybara 2.0.1