加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby – Cucumber:自动步骤文件创建?

发布时间:2020-12-17 03:43:26 所属栏目:百科 来源:网络整理
导读:当我运行黄瓜时它会显示出来 我应该定义的可能步骤,RSpec书中的一个例子: 1 scenario (1 undefined)4 steps (4 undefined)0m0.001sYou can implement step definitions for undefined steps with these snippets:Given /^I am not yet playing$/ do pending
当我运行黄瓜时它会显示出来
我应该定义的可能步骤,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

有没有办法自动创建步骤定义文件,所以我不必
手工重写或复制粘贴,但我可以只是自定义它们更通用?

解决方法

黄瓜不提供此功能.可能是因为你必须告诉它在哪里放置步骤定义文件,以及命名它.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读