Fixed rspec tests deprecation warnings