Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

host required #14

Open
chikamichi opened this issue Dec 13, 2012 · 2 comments
Open

host required #14

chikamichi opened this issue Dec 13, 2012 · 2 comments

Comments

@chikamichi
Copy link

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!

@jayzes
Copy link
Owner

jayzes commented Dec 13, 2012

Hmm, I've not run into this one. What versions of Rails and Capybara are you on?

@chikamichi
Copy link
Author

Rails 3.2.9 and Capybara 2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants