Best practice as I understand it is to include all your task logic in a
Rails model and then test that via standard unit testing methods. The code
in the actual rake task itself should be limited to handling command line
parameters, managing dependencies, and making the call to your model.
On Thu, Feb 10, 2011 at 2:52 AM, Mohammad El-abid
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:
> So I love testing, but I''ve only done functional and unit testing
via
> the built-in suite. The application I''m working on now has a rake
file,
> but I''m clueless as to how I would test it. I need to create some
> records, run the rake, then check these records. I put it in the unit
> tests, but it looked ugly and reloading the records gave me an error. So
> what is the proper way to do this?
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.