title: Unit test failing when directive is an Attribute
body: <p>I have a directive which is declared as an Attribute:</p>
  
  <pre><code>app.directive('myDirective', function() {
      return {
          restrict: 'A',
          replace: true,
          transclude: true,
          scope: {
              data: "="
          },
          template:
              '&lt;p class="my-paragrapgh"&gt;' +
                  '&lt;label&gt;Hello&lt;/label&gt;' +
              '&lt;/p&gt;'
      }
  });
  </code></pre>
  
  <p>I have a unit test, which is failing:</p>
  
  <pre><code>describe('myDirective test', function () {
  var scope, compile, element;
  
  beforeEach(module('myModule'));
  
  beforeEach(inject(function ($rootScope, $compile) {
      scope = $rootScope.$new();
  
      element = angular.element("&lt;div my-directive&gt;&lt;/div&gt;");
      $compile(element);
      scope.$digest();
  }));
  
  it('should have a my-paragrapgh class', function () {
      expect($(element).find('p')[0]).toHaveClass('my-paragrapgh');
  });
  
  });
  </code></pre>
  
  <p>However, if i convert my diretive to an Element, and remove replace and transclude:</p>
  
  <pre><code>app.directive('myDirective', function() {
      return {
          restrict: 'E',
          //replace: true,
          //transclude: true,
          scope: {
              data: "="
          },
          template:
              '&lt;p class="my-paragrapgh"&gt;' +
                  '&lt;label&gt;Hello&lt;/label&gt;' +
              '&lt;/p&gt;'
      }
  });
  </code></pre>
  
  <p>My unit test passes:</p>
  
  <pre><code>describe('myDirective test', function () {
  var scope, compile, element;
  
  beforeEach(module('myModule'));
  
  beforeEach(inject(function ($rootScope, $compile) {
      scope = $rootScope.$new();
  
      element = angular.element("&lt;my-directive&gt;&lt;/my-directive&gt;");
      $compile(element);
      scope.$digest();
  }));
  
  it('should have a my-paragrapgh class', function () {
      expect($(element).find('p')[0]).toHaveClass('my-paragrapgh');
  });
  
  });
  </code></pre>
  
  <p>How can i successfully test a directive declared as an Attribute? I'm using Karma, Jasmine and PhantomJS</p>