如何将Cumber场景标记为待定,这样就不会被视为已通过?

Scenario: Guest should not see edit link
# pending implementation

难道我不能把它标记为待定吗?

推荐答案

好吧,我想出来了.

如果在任何步骤文件中都找不到场景步骤,则将其标记为挂起.

Scenario: New product form should have some special field
  Given joe is logged in as an user
  When on the new exercise page
  Then the select field should have some special field

它甚至可以省go 等待的步骤.

When /^on the new exercise page$/ do
  pending # express the regexp above with the code you wish you had
end

Ruby相关问答推荐

为什么在if语句中的赋值操作不会在条件判断之前发生?

使用 Ruby,我如何访问和比较这些嵌套的数组值?

为什么我的二维 Ruby 数组的多个值会发生变化,尽管只更改了其中一个?

如何在 Ruby 中创建可调用属性

`Range#include?` 和 `Range#cover?` 有什么区别?

Ruby 局部变量未定义

为什么 ruby​​ 在 Windows 上这么慢?

如何在 ruby​​ 中编写负循环,例如 for(i=index; i >= 0; i --)

Ruby:从字节创建一个字符串

Rails:Date.today 是 UTC 吗?

为什么整数除法在许多脚本语言中舍入?

发现 Ruby 对象成员?

ActiveSupport::Memoizable 指的是哪种 Ruby memoize 模式?

Ruby on rails - 静态方法

如何在 Ruby 脚本中运行 Rake 任务?

Ruby中block和&block的区别

处理来自 Net::HTTP 的异常的最佳方法是什么?

如何在 Ruby 中重命名文件?

如何在 Ruby 中读取整个文件?

Ruby - 无法修改冻结的字符串 (TypeError)