We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6448de8 commit 3a36c2eCopy full SHA for 3a36c2e
lib/ex_unit/lib/ex_unit/assertions.ex
@@ -308,7 +308,7 @@ defmodule ExUnit.Assertions do
308
309
quote do
310
receive do
311
- unquote(expected) = received -> received
+ unquote(expected) = received -> unquote(expected) = received
312
after
313
unquote(timeout) ->
314
flunk unquote(message) || "Expected to have received message matching #{unquote binary}"
lib/ex_unit/test/ex_unit/assertions_test.exs
@@ -89,6 +89,12 @@ defmodule ExUnit.AssertionsTest do
89
end
90
91
92
+ test "assert received leaks" do
93
+ send self, { :hello, :world }
94
+ assert_received { :hello, world }
95
+ :world = world
96
+ end
97
+
98
test "refute received does not wait" do
99
false = refute_received :hello
100
0 commit comments