假设我有一堆测试:
spec/code_spec.rb
:
require "rails_helper"
RSpec.describe Code do
xit { Code.evaluate("Twitter.search") }
xit { Code.evaluate("Slack.send") }
xit { Code.evaluate("Twitter.send") }
end
我得到了:
~/s/d/code> rspec spec/code_spec.rb
Randomized with seed 54828
Code
example at ./spec/code_spec.rb:5 (PENDING: Temporarily skipped with xit)
example at ./spec/code_spec.rb:6 (PENDING: Temporarily skipped with xit)
example at ./spec/code_spec.rb:4 (PENDING: Temporarily skipped with xit)
Pending: (Failures listed here are expected and do not affect your suite's status)
1) Code
# Temporarily skipped with xit
# ./spec/code_spec.rb:5
2) Code
# Temporarily skipped with xit
# ./spec/code_spec.rb:6
3) Code
# Temporarily skipped with xit
# ./spec/code_spec.rb:4
Finished in 0.00251 seconds (files took 3.32 seconds to load)
3 examples, 0 failures, 3 pending
Randomized with seed 54828
我希望RSpec执行测试,如果测试通过则失败,理想情况下会告诉我需要取消跳过它们.
有可能吗?