typ*_*ror 10 ruby ruby-on-rails capybara
我希望这些测试不会"失败",但会被标记为待定.也许我没有专门为Capybara使用待定或正确的指令?
feature 'Tenant Scoping ' do
scenario "displays only Tenant A's things" do
pending
end
scenario "displays only Tenant B's things" do
pending
end
end
Run Code Online (Sandbox Code Playgroud)
这是运行时的输出:
Tenant Scoping
displays only Tenant A's things (FAILED - 1)
displays only Tenant B's things (FAILED - 2)
Failures:
1) Tenant Scoping displays only Tenant A's things FIXED
Expected pending 'No reason given' to fail. No Error was raised.
# ./spec/features/tenants/scopingtest_spec.rb:3
2) Tenant Scoping displays only Tenant B's things FIXED
Expected pending 'No reason given' to fail. No Error was raised.
# ./spec/features/tenants/scopingtest_spec.rb:7
Finished in 0.04047 seconds (files took 1.62 seconds to load)
2 examples, 2 failures
Run Code Online (Sandbox Code Playgroud)
Dyl*_*kow 10
从RSpec 3开始,未决示例如果通过则被视为失败.尝试使用skip而不是pending完全跳过这些规范.
有关详细信息,请参阅RSpec 3中的显着更改.