module Symbiote::Situation
Private Instance Methods
empty_locator(locator, values)
click to toggle source
# File lib/symbiote/situation.rb, line 41 def empty_locator(locator, values) locator[0].nil? && values.empty? && !values[0].is_a?(Hash) end
no_locator(definition, identifier)
click to toggle source
# File lib/symbiote/situation.rb, line 34 def no_locator(definition, identifier) puts "PROBLEM: No locator provided." puts "You are using '#{identifier}' on '#{definition}'." puts "But there is no locator provided with it." abort end
no_title_is_provided()
click to toggle source
# File lib/symbiote/situation.rb, line 28 def no_title_is_provided puts "PROBLEM: No title provided." puts "You called a '#{retrieve_method(caller)}' action but the" puts "definition #{self.class} does not have a title_is assertion." end
no_url_provided()
click to toggle source
# File lib/symbiote/situation.rb, line 12 def no_url_provided puts "PROBLEM: No url provided." puts "You called a '#{retrieve_method(caller)}' action but the " puts "definition #{self.class} does not have a url_is assertion." puts "Either provide the url_is assertion or pass the url as an" puts "argument to the visit call." abort end
retrieve_class(caller)
click to toggle source
# File lib/symbiote/situation.rb, line 45 def retrieve_class(caller) caller[1][/`.*'/][8..-3] end
retrieve_method(caller)
click to toggle source
# File lib/symbiote/situation.rb, line 49 def retrieve_method(caller) caller[0][/`.*'/][1..-2] end
title_is_empty()
click to toggle source
# File lib/symbiote/situation.rb, line 21 def title_is_empty puts "PROBLEM: title_is assertion empty." puts "The title_is assertion is empty on" puts "the definition #{retrieve_class(caller)}." abort end
url_is_empty()
click to toggle source
# File lib/symbiote/situation.rb, line 5 def url_is_empty puts "PROBLEM: url_is assertion empty." puts "The url_is assertion is empty on" puts "the definition #{retrieve_class(caller)}." abort end