Testing CRUD/Rest Controllers

I have a few simple controllers doing plain, simple crud in a standard
way.
now it’s not very DRY to write a funtcional test for each controller,
since
they are all doing the same (apart from a few variable names, but that
could
be easily inflected or so).
is there a way to do this?
e.g. does inheritance work with tests, so i define a base test first,
inherit my other tests and add a few controller-specific (if there are)?

or is there another way?


Michael S. [email protected]

www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium

Michael S. wrote:

I have a few simple controllers doing plain, simple crud in a standard
way. now it’s not very DRY to write a funtcional test for each
controller, since they are all doing the same (apart from a few
variable names, but that could be easily inflected or so).
is there a way to do this?
e.g. does inheritance work with tests, so i define a base test first,
inherit my other tests and add a few controller-specific (if there are)?

or is there another way?
Mixins are a more Ruby way. See this post for details:
http://rails.techno-weenie.net/tip/2006/4/24/dry_up_your_unit_tests


Istvan Hoka

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs