Removed deprecation warning in rspec