提升#尚未在Rspec中实现

时间:2015-03-26 23:40:51

标签: ruby-on-rails ruby rspec

我们假设我有这个测试:

test "checks String1 and String2" do
   expect(String1).to be eq("first test")

   #here i want to raise not implemented because I also will have
    #to check for String2
end

如何引发# Not yet implemented in Rspec错误。这通常发生在测试留空时:

 test "test1"
 test "test2"

是否有像skip这样的方法? 谢谢!

1 个答案:

答案 0 :(得分:1)

exactly something like skip

如果您希望在实施该方法之前测试套件不会通过,您也可以fail :not_implemented或其他东西。