0
votes

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).

1
I don't think rspec by it self would work, either do a rspec spec or use the way I prefer more which is bin/rake and it will call internally rspec on the correct files.Mohammad AbuShady
Which version of rspec and capybara do you use ?Yann VERY
can you try rake spec instead of just rspec ?Taryn East
Do you mark describe as feature? Example, describe "the signin process", :type => :feature doalexey.chumagin

1 Answers

1
votes

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.