fix failing spec due to misuse of method stubbing