Closed magni- closed 2 years ago
Thanks for the suggestion but the current behaviour is by design, as typically it is something that is broken internally rather than an expectation that fails, I would say that if you know what the "anti" result is you should just negate the expectation, and your own suggestion works well to achieve what you want for a general catch all, (that is wrap the test in a expect ... to raise_error(RSpec::Expectations::ExpectationNotMetError)
)
Right now, marking a test as
pending
causes it to swallow all exceptions, not just failed expectations.I added the following to our
spec_helper.rb
as a hacky workaround:Users who want to use
pending
to silence an exception rather than a failed expectation could useexpect ... to_not raise_error
to get the same behavior they currently have.