Use new RSpec syntax to fix deprecation warnings.