Reputation: 3514
I'm using rspec-rails 2.13.1 and Capybara 1.1.4. Whenever I try to get root_path
or get page_path("anything")
, the spec throws ActionController::RoutingError:No route matches [GET] "/"
I can run visit 'http://example.dev
no problem, but I'd much rather use URL helpers. Any idea why this might not be working?
Upvotes: 0
Views: 1230
Reputation: 24815
You can still use named urls in Capybara like
visit root_path
But you can't use get
, post
in Capybara, which are better for controller tests. Also, they are considered low level in Capybara's integration tests.
Upvotes: 1