Post last test function

Hi,

I have a small function I have built that I can run at each test to set up some data on the fly. Works well and really makes things easy.

{player_id, game_id} = TestHelper.init_single_state(player_name)

I the do whatever I want with the state and at the end of the function I run this to clean it out.

TestHelper.cleanup_single_state({player_id, game_id})

Now I have a module where none of the functions alter the state and it would be very neat to run it in setup_all and that works well.

The problem is that I cannot find how to run the cleanup after all the tests are done. Such as a remove_all.

Is there such a function?

Maybe after_suite.

2 Likes