Fixed deprecation warnings for upcoming rspec upgrade.