Created
January 17, 2014 19:39
-
-
Save zapnap/8480021 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= require application | |
#= require angular-mocks | |
#= require sinon | |
#= require jasmine-sinon | |
beforeEach(module('AngularApp')) | |
beforeEach inject (_$httpBackend_, _$compile_, $rootScope, $controller, $location, $injector, $timeout) -> | |
@scope = $rootScope.$new() | |
@http = _$httpBackend_ | |
@compile = _$compile_ | |
@location = $location | |
@controller = $controller | |
@injector = $injector | |
@timeout = $timeout | |
@model = (name) => | |
@injector.get(name) | |
@eventLoop = | |
flush: => | |
@scope.$digest() | |
@sandbox = sinon.sandbox.create() | |
afterEach -> | |
@http.resetExpectations() | |
@http.verifyNoOutstandingExpectation() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment