platanus / potassium

A Rails application generator by Platanus, inspired by Suspenders
MIT License
232 stars 17 forks source link

Temporary data (docker containers, directories, databases) should be erased after each test #210

Closed rjherrera closed 5 years ago

rjherrera commented 5 years ago

After running tests for potassium itself, containers are not dropped, so they fill the host's computer with dummy/useless containers. The after block in database_container_spec.rb should be available as a helper or default behavior for every other spec.

In the same line, databases and directories should be removed as a default behavior after every spec. They are usually deleted in a before(:all) block in every recipe's spec, but that's because they are not deleted in the previous spec. That should be done in an after block in every spec, or in a default helper.