Class: Webrat::Selenium::Matchers::HaveTag

Inherits:
HaveSelector show all
Defined in:
lib/webrat/selenium/matchers/have_tag.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from HaveSelector

#initialize, #matches?

Constructor Details

This class inherits a constructor from Webrat::Selenium::Matchers::HaveSelector

Instance Method Details

#failure_messageObject

Returns

String

The failure message.



8
9
10
# File 'lib/webrat/selenium/matchers/have_tag.rb', line 8

def failure_message
  "expected following output to contain a #{tag_inspect} tag:\n#{@document}"
end

#negative_failure_messageObject

Returns

String

The failure message to be displayed in negative matches.



14
15
16
# File 'lib/webrat/selenium/matchers/have_tag.rb', line 14

def negative_failure_message
  "expected following output to omit a #{tag_inspect}:\n#{@document}"
end

#selectorObject



19
20
21
22
23
24
# File 'lib/webrat/selenium/matchers/have_tag.rb', line 19

def selector
  attribute_selector=super
  @options.each do |key, value|
    attribute_selector << "[#{key}='#{value}']"
  end
end