Fix deprecations for rspec 3 support