title: Dynamically load JSON for ngMock httpBackend response in Protractor
body: <p>I'm building an ngMock httpBackend in a Protractor test.</p>
  
  <pre><code>var mockJson = require(projectRoot + 'mock/load.json');
  
  var mockResource = function() {
      angular.module('aMockObject', ['myApp', 'ngMockE2E'])
      .run(function($httpBackend) {
          $httpBackend.whenGET('a/path').respond(mockJson);
      });
  };
  </code></pre>
  
  <p>The default JSON object for the mock response needs to be loaded from a file.</p>
  
  <p>However, the $httpBackend code is actually executed in the browser context, not the Protractor script context, so the <code>mockJson</code> variable is undefined.</p>
  
  <p>Is there any other way to make this work? All I could think of is some sort of injected script tag to load the json file in the browser context.</p>