Fix some testing bugs around persistent state and an rspec driver bug