Skip to content

Instantly share code, notes, and snippets.

@doktor500
Last active January 2, 2016 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doktor500/8308088 to your computer and use it in GitHub Desktop.
Save doktor500/8308088 to your computer and use it in GitHub Desktop.
'use strict';
describe('Directive', function() {
var $rootScope;
var $compile;
var compileDirective = function (markup, scope) {
var el = $compile(markup)(scope);
scope.$digest();
return el;
};
beforeEach(module('directives'));
beforeEach(inject(function (_$rootScope_, _$compile_) {
$rootScope = _$rootScope_;
$compile = _$compile_;
}));
it('spec', function(){
var element = compileDirective('<directive />', $scope);
expect(...);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment