Commit b8432b1e authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'documentation-negate-predicates' into 'master'

Add note to docs on negatable custom  matchers

See merge request gitlab-org/gitlab!48467
parents 888502fa 4af915f9
......@@ -372,8 +372,10 @@ end
[See this merge request for a real example of adding a custom matcher](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46302).
We are creating custom negatable matchers in `qa/spec/support/matchers`.
NOTE:
We need to create custom negatable matchers only for the predicate methods we've added to the test framework, and only if we're using `not_to`. If we use `to have_no_*` a negatable matcher is not necessary.
We need to create custom negatable matchers only for the predicate methods we've added to the test framework, and only if we're using `not_to`. If we use `to have_no_*` a negatable matcher is not necessary but it increases code readability.
### Why we need negatable matchers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment