In a fit of gentle snarkiness, Fearless Fool wrote:
Before Marnen tells me to put aside my Luddite tendencies and that I
should learn factory_girl or Machinist or the next testing framework du
jour, is there any sensible way to do this using fixtures?
The more I've looked into it, the more I think Marnen would be justified
in telling me to put aside my Luddite tendencies: the fixtures framework
creates an arbitrary (and brittle) separation between test data and test
functions.
I'm currently grabbing the gems for RSpec and factory_girl.
In a fit of gentle snarkiness, Fearless Fool wrote:
Before Marnen tells me to put aside my Luddite tendencies and that I
should learn factory_girl or Machinist or the next testing framework du
jour, is there any sensible way to do this using fixtures?
The more I've looked into it, the more I think Marnen would be justified
in telling me to put aside my Luddite tendencies: the fixtures framework
creates an arbitrary (and brittle) separation between test data and test
functions.
Exactly! That's a big reason that fixtures suck. It's much nicer to
use factories to create test data where you need it.
I'm currently grabbing the gems for RSpec and factory_girl.
You may find Machinist easier to work with than FG. Also check out
Faker, which is very useful with any fixture gem.
So there!
- ff (channeling for Marnen
LOL! Well played. This is apparently my week to be snarked on the
list.