Module: Symbiont::Assertion

Includes:
Helpers
Defined in:
lib/symbiont/assertions.rb

Instance Method Summary collapse

Instance Method Details

#asserted_titleObject



29
30
31
# File 'lib/symbiont/assertions.rb', line 29

def asserted_title
  @title
end

#asserted_urlObject



21
22
23
# File 'lib/symbiont/assertions.rb', line 21

def asserted_url
  @url
end

#title_is(title = nil) ⇒ Object



16
17
18
19
# File 'lib/symbiont/assertions.rb', line 16

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

#url_is(url = nil) ⇒ Object



5
6
7
8
# File 'lib/symbiont/assertions.rb', line 5

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

#url_matchObject



25
26
27
# File 'lib/symbiont/assertions.rb', line 25

def url_match
  @url_match
end

#url_matches(pattern = nil) ⇒ Object



10
11
12
13
14
# File 'lib/symbiont/assertions.rb', line 10

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