-
Notifications
You must be signed in to change notification settings - Fork 21
How It Works
Assent compares the output of a test (the received value) with a previously approved value loaded from an approved file.
When the test is run, it will look for an approved file in the same
directory as the code file. See the Naming on how this is achieved
and how to customise this. On the first run, an empty approvedfile is created.
If the received value does not match the value in
the approved file, a received file is written and the diff tool launched
comparing the received and approved files. The test execution will resume
once the diff tool is closed.
You can then compare the two files and determine whether there is an
error in the code, or the approved file needs updating. If it is the
latter, use the diff tool to update and save the approved file. If
this is done during the test execution, and the files now match, the test will
pass. Otherwise it will fail.