adds before_all() and its test is passing. Also, refactors global blocks variables