Fix broken spec
Make rake task smarter