[rspec-users] Best way to test tasks
mguterl at gmail.com
Tue Aug 2 17:51:43 EDT 2011
On Tue, Aug 2, 2011 at 4:41 PM, Piter Fcbk <piter.fcbk at gmail.com> wrote:
> I have a task that runs frequently in order to get/import data from another
> 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.
Assuming you are asking about rake tasks... I typically extract the
body of the task into a method and then test that method. This
typically leaves the rake task very thin and I do not worry about
testing the task itself.
More information about the rspec-users