move spec code to spec, move rake code to lib/tasks