title: Angularjs injecting $resource into factory for Testing with jasmine
body: <p>I am writing my unit tests to test factory developed as below</p>
  
  <pre><code>angular.module("MyApp.Factory",[]).factory("factory",function($resource, baseUrl) {
      return {
          someService: function () {
              return $resource(baseUrl + "/someUri");
          }
      };
  });
  </code></pre>
  
  <p>jasmine spec for the same</p>
  
  <pre><code>describe("My App Factory Tests", function () {
  
          var $factory;
  
          beforeEach(function () {
  
              module("MyApp.Factory");
  
              inject(function (factory) {
                  $factory = factory;
              });
  
          });
  
          it("Factory must be defined", function () {
              expect($factory).toBeDefined();
          });
  
  
      });
  </code></pre>
  
  <p>but i end up with the below error from the jasmine html test page</p>
  
  <p><code>Error: Unknown provider: $resourceProvider &lt;- $resource &lt;- eligibilityService</code></p>
  
  <p>Please suggest the right way to test the factory  </p>