File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -2355,7 +2355,7 @@ defmodule Kernel.SpecialForms do
23552355 defmacro try ( args ) , do: error! ( [ args ] )
23562356
23572357 @ doc """
2358- Checks if there is a message matching any of the given clauses in the current
2358+ Consumes the first message matching any of the given clauses in the current
23592359 process mailbox.
23602360
23612361 If there is no matching message, the current process waits until a matching
Original file line number Diff line number Diff line change @@ -459,8 +459,10 @@ defmodule ExUnit.Assertions do
459459 The default timeout duration is determined by the `assert_receive_timeout` option,
460460 which can be set using `ExUnit.configure/1`. This option defaults to 100 milliseconds.
461461
462- The `pattern` argument must be a match pattern. Flunks with `failure_message`
463- if a message matching `pattern` is not received.
462+ The `pattern` argument must be a match pattern.
463+
464+ Flunks with `failure_message` if a message matching `pattern` is not received.
465+ If a message matches, it is also removed from the process mailbox.
464466
465467 ## Examples
466468
@@ -487,8 +489,10 @@ defmodule ExUnit.Assertions do
487489 Asserts that a message matching `pattern` was received and is in the
488490 current process' mailbox.
489491
490- The `pattern` argument must be a match pattern. Flunks with `failure_message`
491- if a message matching `pattern` was not received.
492+ The `pattern` argument must be a match pattern.
493+
494+ Flunks with `failure_message` if a message matching `pattern` was not received.
495+ If a message matches, it is also removed from the process mailbox.
492496
493497 Timeout is set to `0`, so there is no waiting time.
494498
You can’t perform that action at this time.
0 commit comments