Sha256: 770db6059e7cdb9d4988c3922269d37a4fec8dd1443b92572ce9310e1235f2ea
Contents?: true
Size: 425 Bytes
Versions: 2
Compression:
Stored size: 425 Bytes
Contents
RSpec::Matchers::define :have_title do |text| match do |page| Capybara.string(page.body).has_selector?('title', :text => text) end end RSpec::Matchers.define(:have_image) do |src| match { |node| node.has_selector? %(img[src="#{src}"]) } failure_message_for_should do "Expected an image with src #{src.inspect}" end failure_message_for_should_not do "Found image with src #{src.inspect}!" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
adminpanel-2.1.1 | spec/support/capybara_matchers.rb |
adminpanel-2.1.0 | spec/support/capybara_matchers.rb |