Skip to content

Releases: zachallaun/mneme

Mneme v0.8.0

20 Jun 17:42
Compare
Choose a tag to compare

v0.8.0 is now available

Thanks to @am-kantox, issue #1 has been closed: variables bound in auto_assert patterns are now accessible outside of the expression! This was the main limitation of Mneme vs. plain ExUnit assertions, so I'm very thankful that it's been resolved.

Prior to this release, you had to use the return value of auto_assert to access anything you were testing. Now, you can bind the result or portions of it inside the assertion pattern:

# previously...
result = auto_assert %{x: 1} <- some_function()

# now...
auto_assert %{x: 1} = result <- some_function()
#                     ^^^^^^
#                     this would previously be a warning or error

auto_assert %{x: x} <- some_function()
#                ^
#                destructuring works as expected