Q:

Can't test multiple instances of a angularjs directive in Jasmine running Karma

I have an uber-edge case here.
I am writing a wrapper directive around a jQuery plugin that transforms a simple html element into a formal Feedback oriented view.
<div my-directive>DirectiveContent</div>

Since the plugin doesn't know what to do with it. My directive transforms it into something like this:
<div my-directve><div class='myPlugin' ng-include></div></div>

At which point I fire the plugin's init function to do the final render. (It creates a title element among other things.)
<div my-directve><div class='feedback feedbackSuccess' ng-include>
    <h2>Title</h2>
    My Content
</div></div>

The rub is that in my jasmine tests in karma, I can do one test. If I do another it will not work.
Here is my directive:
module.directive("feedback", function(){
    return {
        restrict : "EA",
        replace : false,
        transclude : true,
        require : "feedback",
        template : "<div class='feedback' ng-transclude></div>",
        controller : function(){
            this.init = function(element){
                plugin.init(element);
            }
        },
        link : function(scope, element, attrs, cntrl){
            var feedback = element.find(".feedback");
            var type = scope.$eval(attrs.type) || "";
            var title = scope.$eval(attrs.title) || "";

            //route standard ric:xxx to actual child feedback element
            feedback.attr("ric:title", title );
            feedback.attr("ric:type", type );

            cntrl.init(feedback);
        }
    };
});

Here is my karma.conf.js:
basePath = '';

files = [
    JASMINE,
    JASMINE_ADAPTER,
    "path/to/plugin.js",
    "components/angular-unstable/angular.js",
    "components/angular-mocks/angular-mocks.js",
    {
        "pattern" : "./src/FeedbackDirective.js",
        "watched" : true,
        "included" : true,
        "served" : true
    },
    {
        "pattern" : "./tests/app.js",
        "watched" : true,
        "included" : true,
        "served" : true
    },
    {
        "pattern" : "./tests/fixtures/*.html",
        "watched" : true,
        "included" : true,
        "served" : true
    },
    './tests/**/*Spec.js'
];

// list of files to exclude
exclude = [];

preprocessors = {
  './tests/fixtures/*.html': 'html2js'
};

reporters = ['progress'];

port = 9876;

runnerPort = 9100;

colors = true;

logLevel = LOG_INFO;

autoWatch = true;

browsers = ['Chrome'];

captureTimeout = 60000;

singleRun = false;

And finally my tests:
   describe('Feedback', function(){
    var $compile;
    var $rootScope;
    var $templateCache;
    var $timeout;
    var testWrap;

    beforeEach(module(
            'app',
            "tests/fixtures/vanilla.html"
        ));

    beforeEach(function(){
        inject(function(_$compile_, _$rootScope_, _$templateCache_, _$timeout_){
            $compile = _$compile_;
            $rootScope = _$rootScope_;
            $templateCache = _$templateCache_;
            $timeout = _$timeout_;

            testWrap = angular.element("<div id='test-wrap'></div>");
        });
    });

    afterEach(function(){
        $rootScope.$destroy();
        testWrap.remove();
    });
    /**
     * Test ONE
     */
    describe("'Vanilla'", function(){
        it("will be instantiated with a 'feedbackSuccess' class", function(){
            var tmpl = angular.element('<div my-feedback>Test Content</div>');

            element = $compile(tmpl)($rootScope);
            testWrap.append(element);
            $rootScope.$digest();
            expect( testWrap.find(".feedback").length ).toBe(1);
            expect( testWrap.find(".feedbackSuccess").length ).toBe(1);
        });
    });
    /**
     * Test TWO
     */
    describe('With attributes', function(){
        it("should pass the title and type to the child feedback element", function(){
            var tmpl = angular.element('<div my-feedback ric:title="\'Static Title\'" ric:type="\'error\'">Test Content</div>');

            element = $compile(tmpl)($rootScope);
            testWrap.append(element);
            $rootScope.$apply();
            expect( testWrap.find(".feedbackError").length ).toBe(1);
        });
    });
});

A:

It turns out that the plugin in question didn't play well with angular-mocks.
The plugin was more of an internal library that had a global initialization function.  For some reason angular-mocks messed with it after the initial call thus killing future calls.
I was able to find workaround: the internal library had a global initialization function which was very buggy. I was able to use a more traditional $("#el").pluginName();
Case closed.

