Correct deprecation warnings in specs