Testing subdirectory rails app with capybara
This is from my experience with rails 3.1 / Capybara 2.03, but maybe someone will find this handy:
Capybara ignores config,ru, thus any mapping you configured there will be lost for tests, and you'll be receiving routing errors
Solution:
#spec_helper
Capybara.app = Rack::UrlMap.new('/subfolder' => Rails.application)
Written by Titov Andrey
Related protips
1 Response
minor typo that might trip people up
Capybara.app = Rack::URLMap.new('/subfolder' => Rails.application)
FYI URLMap is part of rack
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#