<html><head></head><body>Sounds like you want `@?=`, which is less confusingly spelled `shouldBe` in hspec.<br><br>-- Keith<div style='white-space: pre-wrap'><br>Sent from my phone with K-9 Mail.</div><br><br><div class="gmail_quote">On 1 March 2022 17:56:02 UTC, Daneel Yaitskov <dyaitskov@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr"><div>Hi List,</div><div></div><div><p dir="auto">I noticed, that I pay more attention than I should, when working with assertions, because I am not sure about argument order i.e. whether the 
expected value goes first or vice-versa. Does anybody have similar thought?<br></p><p>Such subtle detail should be easy to grasp with regular practice, but I observe difficulties and I suspect that there is a logical reason for that.<br></p><p>Unit tests appeared long time ago in Java and spread over all languages. HUnit library inherited de facto standard assert function name and signature. I don't know reasoning behind original signature.<br></p><p dir="auto">I spe<span style="font-family:arial,sans-serif">ll "assertEqual" expression as:  "Assert that x equals to y"<br>"y" sounds like a mo</span>del value (i.e. expected value).</p>
<p dir="auto">In assignments <code>"x <- y"</code>  y is the model value, because it defines <code>"x"</code>.<br>
You get <code>"x"</code> - value on the left not on the right.</p><p dir="auto"></p><p>Similar issue with test fixing - I always have to  check first, that an expected value is actually one. There is no type safety preventing mixing arguments. I had to open and comprehend a source file with test, because test log is not 100% safe. <br></p><p dir="auto"><br></p></div></div></blockquote></div></body></html>