当我运行 cucumber 时,它会显示我应该定义的可能步骤,RSpec book 中的一个示例:
1 scenario (1 undefined)
4 steps (4 undefined)
0m0.001s
You can implement step definitions for undefined steps with these snippets:
Given /^I am not yet playing$/ do
pending
end
When /^I start a new game$/ do
pending
end
Then /^the game should say “Welcome to CodeBreaker”$/ do
pending
end
Then /^the game should say “Enter guess:”$/ do
pending
end
有没有办法自动创建步骤定义文件,所以我不必手动重写或复制粘贴,但我可以将它们自定义为更通用?