Fix Rspec deprecation warnings when running tests

[ci skip]