Reputation: 287690
I have an application that at some point redirects to a different web site, on a different domain. I'm trying to test it with Capybara and Poltergeist and I'm getting this error:
Minitest::UnexpectedError: ActionController::RoutingError: No route matches [GET] "/thank-you-for-registering"
That path is in the other web site, so it shouldn't be executed as an action in my Rails app. I don't need to fetch that page, but I need my test not to crash. Any ideas how to achieve that?
Upvotes: 1
Views: 221
Reputation: 49910
If it's calling that action on your app either the url is wrong in your page, or you're not actually using poltergeist for your test. If you're not actually using poltergeist for the test then it would default to the rack-test driver which completely ignores the host name in all Uris requested.
Upvotes: 1