Skip to content

Instantly share code, notes, and snippets.

@flyinprogrammer
Created August 17, 2012 15:50
Show Gist options
  • Save flyinprogrammer/3380068 to your computer and use it in GitHub Desktop.
Save flyinprogrammer/3380068 to your computer and use it in GitHub Desktop.
###level 1
def rspec_test
validate(TestPage, "STRING")
end
###level 2
def validate(page_object, *live_url)
return check_page_file_class(page_object, *live_url)
end
###level 3
def check_page_file_class(page_file_class, *live_url)
#########
# live_url.is_a? Array == true
# The logic is that *live_url should be optional, because if it isn't present,
# we skip opening to a url, otherwise we try to open the url.
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment