I am trying to setup a model class that I want to inherit from
ActveRecord when in the test mode, and not inherit when in production
and/or development mode. The reason for this is so that I can use
fixtures to test that the logic in the model is working correctly, but I
don’t want the database table around during production (and normal
I would like to do this the preferred “rails” way.
I’ve tried a few solutions using mixins and also using a conditional
expression to control the class definition, but anything I come up with
ether doesn’t work or looks some shade of ugly. (The worst being to
duplicatee the class and wrap each definition in conditional code).
Thanks in advance,