Module: Spec::Matchers::Watir

Defined in:
lib/spec/ui/watir/matchers.rb

Overview

Matchers for Watir::IE/Watir::Safari instances

Defined Under Namespace

Classes: ContentMatcher, ElementMatcher

Instance Method Summary collapse

Instance Method Details

#have_html(text_or_regexp) ⇒ Object

RSpec matcher that passes if @container#html matches text_or_regexp (String or Regexp)



33
34
35
# File 'lib/spec/ui/watir/matchers.rb', line 33

def have_html(text_or_regexp)
  ContentMatcher.new(:html, text_or_regexp)
end

#have_text(text_or_regexp) ⇒ Object

RSpec matcher that passes if @container#text matches text_or_regexp (String or Regexp)



28
29
30
# File 'lib/spec/ui/watir/matchers.rb', line 28

def have_text(text_or_regexp)
  ContentMatcher.new(:text, text_or_regexp)
end