Module: Testable::Interface::Page::Attribute

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

Instance Method Summary collapse

Instance Method Details

#title_attribute ⇒ Object



32
33
34
# File 'lib/testable/interface.rb', line 32

def title_attribute
  @title
end

#title_is(title) ⇒ Object



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

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

#url_attribute ⇒ Object



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

def url_attribute
  @url
end

#url_is(url = nil) ⇒ Object



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

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

#url_match_attribute ⇒ Object



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

def url_match_attribute
  @url_match || url_attribute
end

#url_matches(pattern = nil) ⇒ Object



13
14
15
16
17
# File 'lib/testable/interface.rb', line 13

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