View Source Snap (snap_assert v0.1.0)
Provides macros for instant snapshot testing, that is, macros that automatically amend the source code of the test file at their call site with the evaluated value of the expression under test.
Summary
Functions
Modifies the source code of the test file at the call site, adding the evaluated value of arg
as the second argument.
With two arguments, snap_assert
is equivalent to a regular assert
Modifies the source code of the test file at the call site, adding the exception produced by fun
as the first argument (or Snap.UnexpectedLackOfException
if no exception is produced).
With two arguments, snap_assert_raise
is equivalent to a regular assert_raise
Functions
Modifies the source code of the test file at the call site, adding the evaluated value of arg
as the second argument.
With two arguments, snap_assert
is equivalent to a regular assert
Modifies the source code of the test file at the call site, adding the exception produced by fun
as the first argument (or Snap.UnexpectedLackOfException
if no exception is produced).
With two arguments, snap_assert_raise
is equivalent to a regular assert_raise