angular.module('app', ['ngMockE2E']) .run(function ($httpBackend) { $httpBackend.whenGET('/some/url').respond({foo: 'bar'}); }) .controller('Ctrl', function ($scope, $http) { $http.get('/some/url') .then(function (result) { $scope.msg = result.foo; }); });