ClientUtils.Check.NoDirectSendInSpex (client_utils v0.6.15)

View Source

Basics

This check is disabled by default.

Learn how to enable it via .credo.exs.

This check has a base priority of high and works with any version of Elixir.

Explanation

Direct send() calls should not be used in BDD spec files (_spex.exs).

Specs describe behavior from the user's perspective. Sending messages directly to a process bypasses the application's public interface and couples the spec to implementation details.

Instead, trigger the behavior through the UI or public API that would cause the message to be sent in production.

Check-Specific Parameters

There are no specific parameters for this check.

General Parameters

Like with all checks, general params can be applied.

Parameters can be configured via the .credo.exs config file.