antonmi / antonmi/espec

Feature: fail_with matcher

Open
#265 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Elixir
Stars
813
Forks
66
PR merge metrics
No merged PRs in 30d

Description

It would be useful to have a `fail_with` matcher similar to [RSpecs `fail_with`](http://www.rubydoc.info/gems/rspec-expectations/RSpec/Expectations.fail_with).

Sometimes we have to write some more complex tests which expect certain underlying behaviour from the tested code which is hard to cover with the existing expectations. On some occasions a custom assertions helps but on others such an assertion would be overkill.

Having a simple option to fail a test in an expected manner without raising an arbitrary error would increase test readability a great deal.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.