 			expect(callbacks.validateErrorHappened).not.toHaveBeenCalled()
 
 		it "will no longer call the success callbacks", ->
-			reqwestResponse = mocks.simpleSuccessResponse
+			reqwestSpy.andCallFake((params)-> params.success(mocks.simpleSuccessResponse))
 			submitButton.click()
 			expect(callbacks.submitSuccessHappened).not.toHaveBeenCalled()
 
 		it "will no longer call the error callbacks", ->
-			reqwestCallback = 'error'
-			reqwestResponse = mocks.errorResponse
+			reqwestSpy.andCallFake((params)-> params.error(mocks.errorXhr))
 			submitButton.click()
 			expect(callbacks.submitErrorHappened).not.toHaveBeenCalled()

describe "FormManager", ->
	manager = submitter = validator = null
	submitButton = null

	reqwestCallback = null
	reqwestResponse = null
	reqwestSpy = (params)-> params[reqwestCallback].apply null, reqwestResponse

	# these are a result of using Function::apply above
	successResponse = -> reqwestResponse[0]
	errorResponse = -> reqwestResponse[1]

	callbacks =
		validateErrorHappened: (form)->

		validator = FormValidator.create()
		manager = new FormManager(submitter, validator)

		spyOn(callbacks, 'validateErrorHappened').andCallThrough()
		spyOn(callbacks, 'submitSuccessHappened').andCallThrough()
		spyOn(callbacks, 'submitErrorHappened').andCallThrough()
		manager.validatedWithErrors.add callbacks.validateErrorHappened
		manager.submittedWithSuccess.add callbacks.submitSuccessHappened
		manager.submittedWithError.add callbacks.submitErrorHappened
		reqwestSpy = spyOn(window, 'reqwest')

	describe '::create', ->

