Testing a Sinatra App with Capybara
3 min readFeb 6, 2016
--
Gems
First things first. Add the following to your gemfile, if they’re not already there:
gem 'minitest'
gem 'capybara'
gem 'launchy'
gem 'database_cleaner'
Minitest: Capybara uses minitest. You should have model tests that use it too (unless you’re using something like Rspec instead).
Capybara: obviously you need capybara to run capybara.
Launchy: this allows you to run the save_and_open_page_path command when writing your tests. When you do this, it saves a copy…