title: angularjs e2e testing assertions with mock http
body: <p>I currently run my angularjs testing environment using ngMockEE which, using a special testing module allows me to mock http responses as such; </p>
  
  <pre><code>var things = [thing01, thing02];
  
  $httpBackend.whenGET('/v1/things?').respond(function() {return [200, things]});
  </code></pre>
  
  <p>In a separate file I define e2e tests which call a things.html file that includes that testing module.</p>
  
  <p>I then define a e2e test like this;</p>
  
  <pre><code>browser().navigateTo('/test/thingTest.html');
  expect(element('.table.things tbody tr').count()).toEqual(2);
  </code></pre>
  
  <p>Now, what would be nice is if I could somehow couple the two togther, so that I could write an assertion like this - avoiding hard coding that <strong>2</strong> which will need updating over time if I update my list of <code>things</code></p>
  
  <pre><code>browser().navigateTo('/test/thingTest.html');
  expect(element('.table.things tbody tr').count()).toEqual(things.length);
  </code></pre>
  
  <p>However I'm not quite sure if this is possible or advisable. Any thoughts?</p>