generator-easy
Version:
An EASY stack generator, Express Angular Stylus Yeoman
23 lines (17 loc) • 601 B
JavaScript
;
describe('Controller: <%= _.classify(name) %>Ctrl', function () {
// load the controller's module
beforeEach(module('<%= _.camelize(appname) %>App'));
var <%= _.classify(name) %>Ctrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
<%= _.classify(name) %>Ctrl = $controller('<%= _.classify(name) %>Ctrl', {
$scope: scope
});
}));
it('should attach a list of awesomeThings to the scope', function () {
expect(scope.awesomeThings.length).toBe(3);
});
});