fix deprecation warning in specs