Module: Testable::Pages::Attribute

Includes:
Situation
Defined in:
lib/testable/attribute.rb

Instance Method Summary collapse

Instance Method Details

#title_attributeObject



33
34
35
# File 'lib/testable/attribute.rb', line 33

def title_attribute
  @title
end

#title_is(title = nil) ⇒ Object



28
29
30
31
# File 'lib/testable/attribute.rb', line 28

def title_is(title = nil)
  title_is_empty if title.nil? || title.empty?
  @title = title
end

#url_attributeObject



14
15
16
# File 'lib/testable/attribute.rb', line 14

def url_attribute
  @url
end

#url_is(url = nil) ⇒ Object



8
9
10
11
12
# File 'lib/testable/attribute.rb', line 8

def url_is(url = nil)
  url_is_empty if url.nil? && url_attribute.nil?
  url_is_empty if url.nil? || url.empty?
  @url = url
end

#url_match_attributeObject



24
25
26
# File 'lib/testable/attribute.rb', line 24

def url_match_attribute
  @url_match
end

#url_matches(pattern = nil) ⇒ Object



18
19
20
21
22
# File 'lib/testable/attribute.rb', line 18

def url_matches(pattern = nil)
  url_match_is_empty if pattern.nil?
  url_match_is_empty if pattern.is_a?(String) && pattern.empty?
  @url_match = pattern
end