Refactoring Tests to Be Self-updating
Learn how to write self-updating tests for a basic schema.
We'll cover the following
Now that we have guaranteed our test’s accuracy in the previous lesson let’s refactor our test to be self-updating.
Creating a self-updating test
Before we write our first test, we’ll write a helper function at the bottom of our test file after all the describe
blocks.
Helper function
The new function will be called valid_params/1
:
Get hands-on with 1400+ tech skills courses.