Permalink
Browse files

Tweaked "When I attempt to" step to allow task names with digits in

  • Loading branch information...
1 parent 91bc61f commit 62db1d2631d599f59714fd2d350605a95a3a6acb @JonRowe JonRowe committed Aug 22, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/cukesalad/cucumber_steps.rb
@@ -15,7 +15,7 @@ def in_order_to(do_something, *with_attributes, &actions)
@actor = CukeSalad::Actor.new(role)
end
-When /^(?:I|you) (?:attempt to|was able to|were able to|did)? ([A-Z a-z_-]*)(?:[:|,] (.*))?:?$/ do | this_task, details, *and_more |
+When /^(?:I|you) (?:attempt to|was able to|were able to|did)? ([A-Z a-z\d_-]*)(?:[:|,] (.*))?:?$/ do | this_task, details, *and_more |
info = understand_the details unless details.nil?
info[info.keys.last] = and_more[0] unless and_more.empty?
@actor.perform this_task, info unless info.nil?

0 comments on commit 62db1d2

Please sign in to comment.