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).
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 .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.