Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joahking/430157 to your computer and use it in GitHub Desktop.
Save joahking/430157 to your computer and use it in GitHub Desktop.
When /^I fill the captcha incorrectly$/ do
captcha_evaluates_to false
end
When /^I fill the captcha correctly$/ do
captcha_evaluates_to true
end
# if you move this method correctly to features/support/recaptcha_helper.rb and include it in World => you feature will fail!
def captcha_evaluates_to(result)
eval <<-CODE
module Recaptcha
module Verify
def verify_recaptcha
#{result}
end
end
end
CODE
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment