When it comes to tests using a database, we're going to want to test on a database separate from our actual application. We want to test in a clean setup so that if we have a test that creates a user with the email test@test.com that test doesn't get hung up because:
We created that user in development
That user is still dangling around from a previous test run
Anything else in between
To resolve this, first, we're going to want to set our test environment to use a completely different database from our dev server. If you're not using SQLite, then you'll want to make a database for testing. I typically do the normal database name, suffixed with _test, like adocasts_test.