ActiveRecord Fixture class name conflict

Hi All,

I posted a ticket to the lighthouse (link below), but I realized that
this might be a better place for discussion of an issue.

I work on a large Rails application which, unfortunately, has an
extensively used Fixture model. Also unfortunately we just recently
started building up our testing suite and as we've been trying to test
our Fixture model, we've been having issues because the Fixture class
which is used in ActiveRecord to load yaml/csv fixtures is overwriting
the initialize method (perhaps others).

From looking into the ActiveRecord source, it seems like it would be
much less work to namespace the Fixture class inside a module than
rename our model. In addition, other users of Rails would be able to
have a "Fixture" model. I'm willing to do the work and to submit a
patch, but I wanted some advice first. Should I namespace just the
Fixture class, or should I namespace the other classes inside the
fixtures.rb file as well? Should I just put them inside of the
ActiveRecord module?

Thanks,
Brian
;p

https://rails.lighthouseapp.com/projects/8994/tickets/6098-activerecord-fixture-class#ticket-6098-1

I for one would expect all classes/modules in the activerecord Gem to be namespaced under ActiveRecord::* namespace.

Hi,

I've responded in the ticket. I agree that it should be namespaced, and if you can make a patch for it that would be really awesome.

Thanks,

Prem

Great, then I'll work on a patch to put all of the classes in the
fixture.rb file under the ActiveRecord module

Thanks,
Brian
;p