Created
August 17, 2012 15:50
-
-
Save flyinprogrammer/3380068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###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