Fixed rspec deprecation warnings