title: Module not found error in AngularJS unit test
body: <p>I'm trying a very simple test with Karma/Jasmine, to unit test my AngularJS app. This seems to work </p>
  
  <pre><code>beforeEach(
          module('myApp')
  );
  
  it('should blah', function () {
      expect(true).toBe(true);
  });
  </code></pre>
  
  <p>while this doesnt</p>
  
  <pre><code>beforeEach(
      function () {
          module('myApp')
      }
  );
  
  it('should blah', function () {
      expect(true).toBe(true);
  });
  </code></pre>
  
  <p>I want to be able to do other stuff beforeEach test suite, but it's not giving me any meaningful errors to be able to debug it, the only one I see is </p>
  
  <pre><code>TypeError: 'undefined' is not an object (evaluating 'currentSpec.queue.running')
  </code></pre>
  
  <p>relating to the line where the function is called within the beforeEach construct in the second example. </p>
  
  <p>Im hoping someone else has come across this and can assist? </p>
  
  <p>Thanks
  Stephen </p>