Refactors the directive example with jasmine-given