Kai Rubarth wrote in post #960590:
I was surprised to find out that Fixtures are ActiveRecord based, even
in Rails 3.0 where integration of other ORMs has become easier.
Although I am using factories like Mechanist and FactoryGirl, I still
believe that fixtures can be useful: They provide a concise, language
independent, easily readable and shareable way to express test data.
YAML files are useful for that, but Rails' fixtures are the wrong way to
deal with them. I suppose you could read factory data from YAML, and
get the advantages of YAML without the brokenness of fixtures.
But anyway, why should your test data be language-independent? Where's
the value in that at the level at which you're using factories? The
only level where that would have any advantage, it seems to me, is the
level at which you're (hopefully) already using Cucumber stories (and
examples, and maybe Pickle), which already give you the language
independence you need.
So I was wondering if there is any plan to remove that ActiveRecord
tie and instead base fixtures on ActiveModel. Or should fixtures be
generally regarded as a relict that is soon going to be removed from
I believe they should be regarded that way. Fixtures are better than
nothing at all, but that's about it. They are misguided and (IMHO)
dangerous. I believe they should be removed from Rails, and I think
*not* removing them in Rails 3 was a missed opportunity.