Add specs for error cases

Add specs for error cases.
Throw error when no `repeat` attribute is provided to directives for which it is expected.