

rspec, spec/spec_helper.rb, spec/rails_helper.rb files and they’ll contain either sensible defaults and tons comments. You’ll need to run rails generate rspec:install which will make a.
#Best webdrive for rails rspec capybara install#
Obviously you’ll want to install RSpec and Capybara, but you’ll also need Selenium and Database Cleaner to help hold things together.Īdd them to the : test and :development groups in your Gemfile and then bundle install: group :development, :test do It has a readable DSL and a variety of configuration options (we’ll get into those later). RSpec is a hugely popular behavior driven development (BDD) oriented testing framework in the Ruby community.Ĭapybara makes it easy to interact with out application the way our users ultimately do: Through the browser. (If you’re more interested in unit testing the JavaScript in your Rails app, check out this post on exactly that.) What Are The Tools? While basic integration of these two is fairly straightforward, there are a few gotchas that can lead to some fairly confusing behavior.

There are a lot of great tools for testing Rails apps RSpec and Capybara are particularly great.
