fix test for 84fb350
mocks should be restored before asserts in case asserts fail
actually handle undefined _gaq