是否可以在RSpec中使用骨架示例作为待处理?

时间:2016-12-23 05:35:41

标签: ruby rspec

我想将一个骨架(空)示例用作挂起。通常,它被视为成功(绿色),但这会产生误解,就像这样。

describe "" do
  # This is displayed as **not pending** but succeeded. 
  it "A skeleton example 1." do
  end

  # If you want to display result as a pending,
  # need to implement the procedure explicitly.
  it "A skeleton example 2." do
    skip "Not Implemented."
  end
end

每次写skip ...都非常痛苦......所以我要避免它。

1 个答案:

答案 0 :(得分:1)

要将示例标记为待处理 - 只需删除do..end阻止。

it 'is not pending example' do
end

it 'is pending example'