tests updates

the test is deleting the .yml file after each test case so when the second
one executes it will fail because the file is no longer there. I've added
a beforeEach statement to create the file before each test executes and it
will be deleted after each test as before.