Sha256: 6aaf4eb045d799fa4bd7c690af8d6ddfcdf405db8f257d18d9860d6a100342d4
Contents?: true
Size: 546 Bytes
Versions: 13
Compression:
Stored size: 546 Bytes
Contents
Capybara::SpecHelper.spec '#match_css?' do before do @session.visit('/with_html') @element = @session.find(:css, 'span', text: '42') end it "should be true if the given selector matches the element" do expect(@element).to match_css("span") expect(@element).to match_css("span.number") end it "should be false if the given selector does not match" do expect(@element).not_to match_css("div") expect(@element).not_to match_css("p a#doesnotexist") expect(@element).not_to match_css("p.nosuchclass") end end
Version data entries
13 entries across 13 versions & 3 rubygems