Testacular Angular UI bootstrap 'directive' is required

I'm trying to unit test a controller which uses the Angular UI-Bootstrap dialog directive, but am receiving a Error: Argument 'directive' is required error.

This actually occurs as soon as I include the ui-bootstrap.min.js file in the Testacular config.

The controller is defined as:

angular.module('xFormsEntries')
    .controller('xFormsEntryListCtrl', function ($scope, $dialog, Form, FormEntry, FormField) {...

The unit test is:

describe('xForms Controllers', function() {

    beforeEach(function() {
        this.addMatchers({
            toEqualData: function(expected) {
                return angular.equals(this.actual, expected);
            }
        });
    });

    beforeEach(module('xFormsServices'));
    beforeEach(module('xFormsEntries'));

    describe('xFormsEntryListCtrl', function() {
        var scope, ctrl, $httpBackend, $dialog;
        var formData = {formId: 1, name: 'FormName'};

        apiURL = ''; // Override the global API URL

        beforeEach(inject(function(_$httpBackend_, $rootScope, $controller, _$dialog_) {
            // Arrange
            $httpBackend = _$httpBackend_;
            $httpBackend.expectGET('/xFormsAPI/Form').respond(formData);

            $dialog = _$dialog_;

            scope = $rootScope.$new();
            scope.formId = 1;
            ctrl = $controller('xFormsEntryListCtrl', {$scope: scope});
        }));

        it('should fetch the form from the server', function () {
            expect(scope.formModel).toBe(undefined);
            $httpBackend.flush();
            expect(scope.formModel).toEqualData(formData);
        });
});

All tests were passing before integrating UI-Bootstrap.

I've tried adding beforeEach(module('ui.bootstrap'));, and other variations, into the test with no luck.

What magic include am I missing to make this work?

Did you include the dependency as well as the actual js file?

Installation As soon as you've got all the files downloaded and included in your page you just need to declare a dependency on the ui.bootstrap module:

angular.module('myModule', ['ui.bootstrap']);