Added truthy check on directive.replace before asserting only one template per element