简体   繁体   中英

How to use Capybara 'visit' with domain constrained routes?

I have domain constrained routes in my rails app:

constraints domain_constraints do
  # Routes definition goes here
end

And I want to use capybara visit to visit those route. I tried to set Capybara.default_host and Capybara.app_host to one of my virtual host domain, but still not working.

I also tried to use selenium-webdriver , to allow visit outside url, but also using VCR which prevent outside url connection.

Thanks for anyone who can help :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM