title: spyOn could not find an object to spy upon for all()
body: <p>I'm getting the above error when I want to mock http REST services created using Restangular.
  Here's my piece of code:</p>
  
  <pre><code>var someParameter = [{ "id": 1, "name": "Length" }]
     spyOn(Restangular, 'one').and.callThrough();
      it('expect company service to be called', function () {     
          httpBackend.expectGET('http://localhost:8283/com/companies', {
              someParameter: someParameter
          }).respond(mockToReturn);
      });
  </code></pre>
  
  <p>Has anybody encountered the same issue.And any fix ?</p>