title: How do I test a string's values in Jasmine?
body: <p>I have a string that is used to display text. It is initially set to null, then is updated throughout a function with status updates. I want to make sure the string is set to the correct status updates throughout the function's lifetime.</p>
  
  <p>Jasmine's spies seem focused on testing functions and their interactions. I specifically want to test a string's history. Assuming the following code:</p>
  
  <pre><code>(function() {
      $this.loggingIn = false;
  
      $this.submit = function () {
          $this.loggingIn = "Requesting access...";
          $this.errorMessage = "";
          var aThing = {};
          var aSecondaryThing = {};
  
          $http.post(aThing)
              .success(function (data, status, headers, config) {
  
                  $this.loggingIn = "Validating credentials...";
  
                  $http.post(aSecondaryThing)
                      .success(function (data, status, headers, config) {
                          $this.loggingIn = "Done!";
                      })
                      .error(function (data, status, headers, config) {
                          $this.errorMessage = data.error_description || "Invalid username or password.";
                          $this.loggingIn = false;
                      });
              })
              .error(function (data, status, headers, config) {
                  $this.errorMessage = data.error_description || "Invalid username or password.";
                  $this.loggingIn = false;
              });
  
              return false;
      };
  })();
  </code></pre>
  
  <p>This function is abridged from our original Angular code. Nothing's missing aside from the wiring to make the controller work and the post actions.</p>
  
  <p>Is there a way to test that <code>loggingIn</code> is set to <code>"Validating credentials..."</code> and then <code>"Done!"</code> <strong>without</strong> writing a setter function to handle it?</p>