黄瓜:自动步骤文件创建? [英] Cucumber: Automatic step file creation?

查看:139
本文介绍了黄瓜:自动步骤文件创建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行黄瓜时,它显示
可能的步骤,我应该定义,一个例子从RSpec书:

When i run cucumber it displays the possible steps that i should define, an example from the 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

有没有办法自动创建步骤定义文件,所以我不必$

Is there a way that it will automaticly create the step definitions file, so i don't have to rewrite or copy paste by hand but i can just to customize them to be more generic?

推荐答案

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

Cucumber doesn't offer this feature. Probably because you would have to tell it where to put the step definitions file, and what to name it.

这篇关于黄瓜:自动步骤文件创建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆