replace deprecated rspec syntax