Improve spec for rake task