examples/demo/features/step_definitions/step_defs.rb in macros4cuke-0.3.17 vs examples/demo/features/step_definitions/step_defs.rb in macros4cuke-0.3.18
- old
+ new
@@ -5,17 +5,25 @@
When(/^I leave '(.*)'$/) do |city|
show "I leave #{city}"
end
-When(/^I visit (.+)$/) do |city|
+When(/^I visit (\S+)$/) do |city|
show "I visit #{city}"
end
+# This step uses a multiline text argument
+When(/^I visit the cities:$/) do |cities_raw|
+ cities = cities_raw.split(/\r\n?|\n/)
+ cities.each { |city| show "I visit #{city}" }
+end
+
+
When(/^I arrive in (.+)$/) do |city|
show "I arrive in #{city}"
end
+
When(/^I type \"([^"]*)\"$/) do |text|
show text
end
\ No newline at end of file