Vlad Balanescu
Vlad Balanescu

Reputation: 674

Capybara trim down the link and getting ActionController::RoutingError:

I have a link in my ruby on rails project which redirects the user here: https://blah.com/files/form/anonymous/api/library/142270db-..., but when running the command

bundle exec rpsec spec/features/*

When I simulate the click of the link I get:

 ActionController::RoutingError:

No route matches [GET] "/files/form/anonymous/api/library/142270db-...

Why is Capybara triming down the link and then getting a routing error?

Upvotes: 0

Views: 51

Answers (1)

Thomas Walpole
Thomas Walpole

Reputation: 49910

Since you don't mention a specific driver, I assume you're using the racktest driver. It ignores the host name and assumes all URLs point to your app since that's all it can access.

Upvotes: 1

Related Questions