How do you get a reference to an angularjs controller defined in a module?

I have a jasmine test and I can't get a reference to the controller constructor function as it was defined in a module. See my gist here https://gist.github.com/hcabnettek/5222429

I need to unit test a controller defined like

angular.module('foo', []).controller('fooCtrl', function($scope){ $scope.foo = 'bar'; });

Can anyone possibly help me out? Thanks!

http://www.itaware.eu/2012/10/19/angularjs-unit-tests-and-end-to-end-tests/

The key was the module() function in angular-mocks. Now it works using the string controller name as defined inside the module.