Simplified the tests a bit

by extracting the common directive template to beforeEach

Issue #7