Fix deprecations in rspec