fail
Fails the current assertion scope with the given message and optional cause.
This function creates an assertion result with the provided failure message and cause, then passes it to consumeAssertion, which typically throws an AssertionError.
Receiver
The assertion scope that will consume the failure.
Parameters
The failure message describing what went wrong.
The throwable that caused the failure, if any. Defaults to null.
Fails the current assertion scope with the given message and optional cause.
This contextual version uses the assertionScope from the surrounding context. It creates an assertion result with the provided failure message and cause.
Context Parameters
The assertion scope that will consume the failure.
Parameters
The failure message describing what went wrong.
The throwable that caused the failure, if any. Defaults to null.