Reputation: 20242
I'm trying to use Capybara with RSpec, but the integration tests are not run when I issue the command rspec
.
I have followed the instructions on the github page and on some online tutorials. I placed:
require 'capybara/rails'
require 'capybara/rspec'
In turn in both rails_helper.rb
and spec_helper.rb
.
Also, I tried putting my spec which uses Capybara in both spec/features
and spec/integration
. However, the specs I wrote are not executed(just as if the file, which is named currency_views_spec.rb
is ignored).
Upvotes: 0
Views: 566
Reputation: 6650
You just need to add 'require capybara/rspec'
to your spec_helper.rb file'
to use Capybara together with RSpec.
This is a well-detailed article about Capybara.
Upvotes: 1