[rspec-users] Best way to test tasks

Pat Maddox patmaddox at me.com
Tue Aug 2 17:31:55 EDT 2011

On Aug 2, 2011, at 4:41 PM, Piter Fcbk wrote:

> I have a task that runs frequently in order to get/import data from another system.
> Because of this I wanted to know which is the best way to test tasks in order to create the tests needed.
> Thanks in advance.

I write simple objects that implement the behavior I want. Then I write rake tasks that instantiate and use those objects. I don't write automated tests for the tasks because they are thin layers over my well-tested objects.


More information about the rspec-users mailing list