Capybara Test Helpers
The perfect companion for your integration tests.
Used 20 times
M
Maximo Mussini
Usage
Write tests that everyone can understand, and leverage your Ruby skills to keep them easy to read and easy to change.
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/zyvs8Z"
Template Source
Review the code before running this template on your machine.
run 'spring stop'
gem_group :development, :test do
gem "rspec-rails"
gem 'capybara_test_helpers'
end
Bundler.with_unbundled_env { run "bundle install" }
rails_command "generate rspec:install"
rails_command "generate test_helper base"
inject_into_file 'spec/rails_helper.rb', after: "require 'spec_helper'" do <<~RB
require 'capybara_test_helpers/rspec'
require Rails.root.join('test_helpers/base_test_helper')
RB
end