Replace rspec deprecated methods with newer alternatives

Now compatible with 2.13.0