How to include Capybara RSpec matchers in RSpecToday I've Learned post
let say you want to use
have_selector in spec
# Gemfile gem 'capybara' gem 'rspec'
# spec/spec_helper.rb #... require 'capybara/rspec' #...
require 'spec_helper' RSpec.describe MyPresenter do include Capybara::RSpecMatchers it do expect("<b>abc</b>").to have_selector("b") end end
Entire blog website and all the articles can be forked from this Github Repo