github.com/kula/etcd@v0.2.1-0.20131226070625-e96234382ac0/mod/dashboard/test/spec/controllers/main.js (about)

     1  'use strict';
     2  
     3  describe('Controller: MainCtrl', function () {
     4  
     5    // load the controller's module
     6    beforeEach(module('etcdDashboardApp'));
     7  
     8    var MainCtrl,
     9      scope;
    10  
    11    // Initialize the controller and a mock scope
    12    beforeEach(inject(function ($controller, $rootScope) {
    13      scope = $rootScope.$new();
    14      MainCtrl = $controller('MainCtrl', {
    15        $scope: scope
    16      });
    17    }));
    18  
    19    it('should attach a list of awesomeThings to the scope', function () {
    20      expect(scope.awesomeThings.length).toBe(3);
    21    });
    22  });