当我运行黄瓜时它显示
我应该定义的可能步骤,RSpec 书中的一个示例:
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
有没有一种方法可以自动创建步骤定义文件,这样我就不必这样做
手动重写或复制粘贴,但我可以将它们自定义为更通用吗?
Cucumber 不提供此功能。可能是因为您必须告诉它将步骤定义文件放在哪里以及如何命名。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)