Skip to content

Instantly share code, notes, and snippets.

@dillonkearns
Created March 16, 2012 19:01
Show Gist options
  • Save dillonkearns/2051862 to your computer and use it in GitHub Desktop.
Save dillonkearns/2051862 to your computer and use it in GitHub Desktop.
Given /^the user enters the (right|wrong) password (\d+) times?$/ do |right_or_wrong, num_tries|
num_tries.to_i.times do
puts "Entering %s password" % right_or_wrong
end
end
Then /^a captcha should( NOT|) be displayed$/ do |is_displayed|
#pending("How do we check if captcha is displayed?")
true.should == false
if is_displayed =~ /NOT/
s = "n't"
else
s = ""
end
puts "Checking that captcha is%s displayed" % s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment