Ruby 如何禁止在RSpec中显示挂起(跳过)的规范?

Ruby 如何禁止在RSpec中显示挂起(跳过)的规范?,ruby,rspec,Ruby,Rspec,我有几个跳过的规格 Pending: (Failures listed here are expected and do not affect your suite's status) 1) ... # Not yet implemented # ./spec/requests/request_spec.rb:22 如何抑制挂起规范的输出?您可以通过将测试标题中的“it”替换为“xit”来实现 替换为: xit "returns true" do 1.should ==

我有几个跳过的规格

Pending: (Failures listed here are expected and do not affect your suite's status)

1) ...
   # Not yet implemented
   # ./spec/requests/request_spec.rb:22

如何抑制挂起规范的输出?

您可以通过将测试标题中的“it”替换为“xit”来实现

替换为:

xit "returns true" do
    1.should == 1
end

在之前添加x将跳过此测试。

RSpec跳过该规范,但将其报告为挂起的规范。令人惊讶的是,
RSpec--tag~skip
起作用。标记为重复的问题实际上没有任何抑制此问题中描述的“挂起测试”部分的答案。(就这一点而言,
--tag~ skip
,据我所知,也是如此。)
xit "returns true" do
    1.should == 1
end