0

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

4
  • 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. Commented May 4, 2015 at 14:34
  • Which version of rspec and capybara do you use ? Commented May 4, 2015 at 15:01
  • can you try rake spec instead of just rspec ? Commented May 5, 2015 at 23:25
  • Do you mark describe as feature? Example, describe "the signin process", :type => :feature do Commented May 6, 2015 at 16:12

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.