jasmine + angular ex 11

$timeout

by ronapelbaum

HTML

<script src="https://jasmine.github.io/2.4/lib/jasmine.js"></script>
<script src="https://jasmine.github.io/2.4/lib/jasmine-html.js"></script>
<script src="https://jasmine.github.io/2.4/lib/boot.js"></script>
<link rel="stylesheet" href="https://jasmine.github.io/2.4/lib/jasmine.css">
<script src="https://code.angularjs.org/1.4.9/angular.js"></script>
<script src="https://code.angularjs.org/1.4.9/angular-mocks.js"></script>

JavaScript

//--------------BL------------
(function() {

  function MyController($timeout) {
    var that = this;
    that.greeting = null;
    that.greet = function(greeting) {
      $timeout(function() {
        that.greeting = greeting + ' bob';
      }, 500);
    }
  }
  angular.module('MyModule', [])
    .controller('MyController', ['$timeout', MyController]);
})();

//--------------specs------------
describe("MyController Spec", function() {


});