title: Injecting angular js service/factory into Jasmine
body: <p>I am trying to run some Jasmine Unit test on a factory I have created in Angular JS.</p>
  
  <p>Here is my app.js </p>
  
  <pre><code>var app = angular.module('myApp', [
      'ngRoute'
  ]);
  </code></pre>
  
  <p>Here is the services.js</p>
  
  <pre><code>app.factory('Service', function(){
      var service = {
          one: function(){
              return 1;
            }
        };
      return service;
    })
  </code></pre>
  
  <p>Here is the Karma conf file </p>
  
  <pre><code>  files: [
        'public/bower_components/angular/angular.js',
        'public/bower_components/angular-mocks/angular-mocks.js',
        'public/js/app.js',
        'public/js/controllers.js',
        'public/js/services.js',
        'test/**/*test.js'
      ],
  </code></pre>
  
  <p>And here is the test</p>
  
  <p>'use strict';</p>
  
  <pre><code>(function () {
  
      describe('myApp', function () {
  
        beforeEach(module('myApp'));
  
        it('testing the service', inject(function (Service) {
          console.log(Service)
        }));
  
      });
  })();
  </code></pre>
  
  <p>I am really stuck and don't know which way to go now :(
  All the correct scripts are loaded into the browser. Also the app works in normal mode in the browser, so the Service factory is fine.</p>
  
  <p>The error message say:</p>
  
  <pre><code>Error: [$injector:modulerr] Failed to instantiate module myApp due to:
      Error: [$injector:modulerr] Failed to instantiate module ngRoute due to:
      Error: [$injector:nomod] Module 'ngRoute' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
  </code></pre>