[rspec-users] Fixtures considered harmful?
Wincent Colaiuta
win at wincent.com
Fri May 18 12:35:30 EDT 2007
El 18/5/2007, a las 17:32, aslak hellesoy escribió:
>> But looking, for example, at the examples at <http://
>> rspec.rubyforge.org/documentation/rails/writing/models.html>, almost
>> all of them use fixtures. Can someone please clarify why use of
>> fixtures are not recommended?
>>
>
> We should get this up on the web page, but I'll provide some insight
> here. The reason why we don't recommend them is along the lines why
> we're not crazy about DRYing up specs. Let me repeat David's Agile
> Spec Manifesto (of which I am the second subscriber):
>
> We prefer clear spec over well factored specs. (Clarity is king).
>
> When everything is in your face you can picture it easier than when
> it's in several different locations (fixture files, helper files etc).
Thanks for the explanation, Aslak. It's very clear. I think a
sentence or two to that effect should definitely go up on the website.
Cheers,
Wincent
More information about the rspec-users
mailing list