I expect these tests not to "FAIL", but be marked as pending. Perhaps I am not using pending or the correct directive for Capybara specifically?
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
Here's the output when run:
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
Just replace 'scenario' with 'xscenario'.
Only drawback is that it will mark the entire feature as pending, instead of each individual spec. I have not found a way around this.
As of RSpec 3, pending examples are considered a failure if they pass. Try using skip
instead of pending
to completely skip those specs.
See Notable Changes in RSpec 3 for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With