Occasionally, an example will have an omitted expectation. This could happen from a hairy git merge, or just plain distraction. Is there anyway to configure Rspec to fail the example if there is no expectation?
If something like this doesn’t exist, it might be an awesome PR candidate for RSpec.
I really like the
pending functionality in RSpec now, where
pending specs that don’t fail within
it blocks produce test failures.
Looks like it’s been talked about long ago here: https://github.com/rspec/rspec-core/issues/404
The consensus seemed to be that it would cause too much coupling between the
rspec-expectations libraries. myronmarston put together an example of how something like this could work, but it’s pretty old and doesn’t seem to anymore.