Using mocks with angular's scenario runner

In angular unit tests, it's possible to create mocks and inject them into controllers. I would like to do the same in e2e tests. Is this possible? I'm looking around but can't find much.

I think the answer may have something to do with ngMockE2E.$httpBackend.

Here is an example of what I would hope it would look like:

describe('server status', function() {

    beforeEach(function() {
        var backend = new HttpBackend(); // or however you get an instance
        backend.get('/foo', 'bar');
        injectBackend(backend);
    });

    it('should display data from server', function() {
        expect(element('.dataFromServer').text()).toBe('bar');
    });
});

Is this possible?

(I am using Testacular and Jasmine, for what it's worth.)

You can use jasmine's spies, which is used for spies, stubs, and mocks. Here's an example of creating an instance of a controller with two stubbed dependencies. It's in coffeescript but you can convert it here.

Depending on what you're looking for though $httpBackend sounds like what I would do. (see SonOfNun's comment)