changed stub to spy, changed another beforeEach to before