describe("Hello world",function(){
var element;
var $scope;
beforeEach(module("app"))
beforeEach(inject(function($compile, $rootScope){
$scope = $rootScope;
element = angular.element("<div test-dir>{{2+5}}</div>");
element = $compile(element)($rootScope);
}))
it("Should be 7",function(){
$scope.$digest();
expect(element.html()).toBe("7")
})
describe("testDir", function() {
it("should add a class of panel", function() {
expect(element.hasClass("panel")).toBe(true);
})
})
})
app.directive('testDir',function(){
return function(scope, element){
element.addClass('panel');
}
})