If you already had the gems in your Gemfile then ensure you have latest version with bundle update capybara selenium-webdriver.
If you want to make sure Capybara feature specs will work on your development machine:
If your feature specs fail then upgrade the driver because you may have installed old one.
Add config file for Capybara:
Ensure you load config files from spec/support directory:
Example feature spec
We can create example feature spec to test if everything works:
And run tests on your development machine with bin/rspec spec/features/home_spec.rb or bundle exec rspec spec/features/home_spec.rb.
Configure CircleCI 2.0 to run Chrome headless
Here is example .circleci/config.yml:
Speed up your tests with Circle CI parallelisation
If your feature specs are very long you can save some time by running multiple parallel CI nodes. For instance set it to 6 in .circleci/config.yml and use dynamic RSpec specs allocation across CI nodes with knapsack_pro gem and Queue Mode to get optimal test suite split to save as much time as possible.