Fix RSpec deprecations in self-tests