module Symbiont::Helpers

Private Instance Methods

no_title_is_provided() click to toggle source
# File lib/symbiont/helpers.rb, line 37
def no_title_is_provided
  puts "\nERROR".on_red
  puts "You called a '#{retrieve_method(caller)}' action but the ".cyan +
    "definition #{self.class} does not have a title_is assertion.".cyan
  raise Symbiont::Errors::NoTitleForDefinition
end
no_url_is_provided() click to toggle source
# File lib/symbiont/helpers.rb, line 23
def no_url_is_provided
  puts "\nERROR".on_red
  puts "You called a '#{retrieve_method(caller)}' action but the ".cyan +
    "definition #{self.class} does not have a url_is assertion.".cyan
  raise Symbiont::Errors::NoUrlForDefinition
end
no_url_matches_is_provided() click to toggle source
# File lib/symbiont/helpers.rb, line 30
def no_url_matches_is_provided
  puts "\nERROR".on_red
  puts "You called a '#{retrieve_method(caller)}' action but the ".cyan +
    "definition #{self.class} does not have a url_matches assertion.".cyan
  raise Symbiont::Errors::NoUrlMatchForDefinition
end
retrieve_class(caller) click to toggle source
# File lib/symbiont/helpers.rb, line 44
def retrieve_class(caller)
  caller[1][/`.*'/][8..-3]
end
retrieve_method(caller) click to toggle source
# File lib/symbiont/helpers.rb, line 48
def retrieve_method(caller)
  caller[0][/`.*'/][1..-2]
end
title_is_empty() click to toggle source
# File lib/symbiont/helpers.rb, line 17
def title_is_empty
  puts "\nERROR".on_red
  puts "The title_is assertion is empty on the definition #{retrieve_class(caller)}.".cyan
  raise Symbiont::Errors::NoTitleForDefinition
end
url_is_empty() click to toggle source
# File lib/symbiont/helpers.rb, line 5
def url_is_empty
  puts "\nERROR".on_red
  puts "The url_is assertion is empty on the definition #{retrieve_class(caller)}.".cyan
  raise Symbiont::Errors::NoUrlForDefinition
end
url_match_is_empty() click to toggle source
# File lib/symbiont/helpers.rb, line 11
def url_match_is_empty
  puts "\nERROR".on_red
  puts "The url_matches assertion is empty on the definition #{retrieve_class(caller)}.".cyan
  raise Symbiont::Errors::NoUrlMatchForDefinition
end