Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: fail_with matcher #265

Open
sascha-wolf opened this issue Mar 3, 2018 · 1 comment
Open

Feature: fail_with matcher #265

sascha-wolf opened this issue Mar 3, 2018 · 1 comment

Comments

@sascha-wolf
Copy link
Contributor

It would be useful to have a fail_with matcher similar to RSpecs 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.

@antonmi
Copy link
Owner

antonmi commented Mar 27, 2018

Hi, @zeeker !
Interesting idea!
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants