Fix failing spec due to missing variable in extracted method