title: Trying to understand Jasmine's toHaveBeenCalled() matcher
body: <p>I am new to <code>jasmine</code> here is my <code>src</code> file in which i create <code>Auth</code> class </p>
  
  <pre><code>function Auth() {
  }
  
  Auth.prototype.isEmpty = function(str) {
      return (!str || 0 === str.length);
  }
  
  Auth.prototype.Login = function (username , password) {
      if (this.isEmpty(username) || this.isEmpty(password)) {
          return "Username or Password cann't be blank ";
      }
      else {
          return "Logged In !";
      }
  }
  </code></pre>
  
  <p>now i want to test jasmine's <code>toHaveBeenCalled()</code> matcher . Here is what i write </p>
  
  <pre><code>it("should be able to Login", function () {
      spyOn(authobj);
      expect(authobj.Login('abc', 'abc')).toHaveBeenCalled();
  });
  </code></pre>
  
  <p>but it says that <code>undefined() method does not exist</code></p>