'use strict'; describe('ng:controller', function() { var element; beforeEach(inject(function($window) { $window.Greeter = function($scope) { // private stuff (not exported to scope) this.prefix = 'Hello '; // public stuff (exported to scope) var ctrl = this; $scope.name = 'Misko'; $scope.greet = function(name) { return ctrl.prefix + name + ctrl.suffix; }; $scope.protoGreet = bind(this, this.protoGreet); }; $window.Greeter.prototype = { suffix: '!', protoGreet: function(name) { return this.prefix + name + this.suffix; } }; $window.Child = function($scope) { $scope.name = 'Adam'; }; })); afterEach(function() { dealoc(element); }); it('should instantiate controller and bind methods', inject(function($compile, $rootScope) { element = $compile('