I have an application in rails 5.2.6 to which I am doing the test with RSPEC and Capybara and for it I have a test database with data that I use to perform the tests and I am running some tests that generate data that are stored in this database. What I need is that after running the tests these data are not stored in it.
I have used the gem database_cleaner but this cleans all the data of the test db and I only want to erase the data that are generated by the tests.
part of my database.yml:
development:
<<: *default
database: f_development
host: localhost
port: 5432
username: postgres
password: postgres
test:
<<: *default
database: f_test
host: localhost
port: 5432
username: postgres
password: postgres