Skip to content

Instantly share code, notes, and snippets.

@pewniak747
Created May 24, 2012 09:36
Show Gist options
  • Save pewniak747/2780469 to your computer and use it in GitHub Desktop.
Save pewniak747/2780469 to your computer and use it in GitHub Desktop.
capybara subdomains helper
Capybara.javascript_driver = :webkit
Capybara.server_port = 7171
def with_subdomain subdomain
old_subdomain = Capybara.app_host
Capybara.app_host = "http://#{subdomain}.localhost.dev:7171"
yield
ensure
Capybara.app_host = old_subdomain
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment