example/step_definitions/example.step.rb in cucumber-in-the-yard-1.5.1 vs example/step_definitions/example.step.rb in cucumber-in-the-yard-1.5.2

- old
+ new

@@ -10,40 +10,44 @@ Transform /^the customer$/ do |customer| "the transformed customer" end +Transform /^((?:\d{1,2}[\/-]){2}(?:\d\d){1,2})?\s*(\w{3})?\s*(\d{1,2}:\d{2}\s*(?:AM|PM)?)$/ do |date,day,time| + "#{date} #{day} #{time}" +end + Given /^that (#{CUSTOMER}) is a valid customer$/ do |customer| pending "Customer #{customer} validation" end When /^a customer logs in as username '([^']+)' with password '([^']+)'$/ do |username,password| Given "that the customer is a valid customer" pending "Customer logs in with #{username} and #{password}" end -Then /^I expect them to have logged in successfully$/ do - pending "Validation that the customer has logged in successfully" +Then /^I expect them to have logged in (successfully|miserably)$/ do |success| + pending "Validation that the customer has logged in #{success}" end When /^the customer logs out$/ do pending end Then /^I expect the customer to be shown the logout page$/ do pending end -And /^this third defined step definition$/ do +And /^this (third) defined step definition$/ do |number| pending end And /^the customer has the following details:$/ do |table| pending "Table of data #{table.hashes}" end -And /^edits their the biography to state:$/ do |bio| - pending "text_field not present for bio #{bio} for this release" +And /^edits their the (biography) to state:$/ do |section,text| + pending "text_field not present for #{section} #{bio} for this release" end # # Some details about the helper method that might be picked up in the documentation. # \ No newline at end of file