Skip to content

Instantly share code, notes, and snippets.

@dlikhten
Created October 25, 2012 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlikhten/3954294 to your computer and use it in GitHub Desktop.
Save dlikhten/3954294 to your computer and use it in GitHub Desktop.
Fun with capybara visit paths and domains.
In capybara tests, I get the following situations:
js - enabled tests
visit "/" - domain = localhost
visit "/agent" - domain = 127.0.0.1
js - disabled tests
visit "/" - domain = localhost
visit "/agent" - domain = www.example.com
WTF is going on here? Please note, this is the domain the browser visits. Nothing to do with any redirections in my app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment