Closed knewter closed 10 years ago
assert_receive({:pong, ^expected})
will fail as expected.
Exactly. assert_receive
, assert_received
and assert left = right
all expect a pattern, so you should pass a pattern. Maybe we should change the name somehow of the first two to make it explicit? Suggestions?
Thanks for this. It feels odd and I'm still new to elixir. Maybe some documentation to help with other newbs? I'd be glad to write it, if you think it's sensible. On Sep 25, 2013 3:01 AM, "Alexei Sholik" notifications@github.com wrote:
assert_receive({:pong, ^expected}) will fail as expected.
— Reply to this email directly or view it on GitHubhttps://github.com/elixir-lang/elixir/issues/1724#issuecomment-25068197 .
@alco already sent a patch to improve the docs. If you would like to extend it further, another pull request is definitely welcome!
was that in elixir or elixir-lang.github.com?
On Wed, Sep 25, 2013 at 8:47 AM, José Valim notifications@github.comwrote:
@alco https://github.com/alco already sent a patch to improve the docs. If you would like to extend it further, another pull request is definitely welcome!
— Reply to this email directly or view it on GitHubhttps://github.com/elixir-lang/elixir/issues/1724#issuecomment-25086904 .
Josh Adams CTO | isotope|eleven http://www.isotope11.com cell 215-3957 work 476-8671 x201
Elixir, it is linked here in this github issue. :)
Derp, didn't see that for some reason. Thanks for the hand-holding :)
On Wed, Sep 25, 2013 at 9:00 AM, José Valim notifications@github.comwrote:
Elixir, it is linked here in this github issue. :)
— Reply to this email directly or view it on GitHubhttps://github.com/elixir-lang/elixir/issues/1724#issuecomment-25087897 .
Josh Adams CTO | isotope|eleven http://www.isotope11.com cell 215-3957 work 476-8671 x201
I've whittled this down to a tiny test case showing the incorrect behaviour.
The general problem is that one of these two tests fail, when both should: