Raise # 尚未在 Rspec 中实施
Raise # Not yet implemented in 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
的方法?
谢谢!
如果您希望测试套件在实现方法之前不通过,您也可以 fail :not_implemented
或其他方式。
假设我有这个测试:
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
的方法?
谢谢!
如果您希望测试套件在实现方法之前不通过,您也可以 fail :not_implemented
或其他方式。