Thanks for the response. Good point about legacy data. In fact, I’m working on a legacy system that I’d like to start integrating Rails into. Would you happen to know of resources that focus on that?
Why do I care that fixtures bypass validations? I’ve been using Agile Web Development with Rails 4th Ed. to learn Rails. On page 83 it says “a test fixture is simply a specification of the initial contents of a model (or models) under test.” I was assuming that to the degree that statement is accurate, the validations coded in the model would be run against the data loaded by the fixtures. Then, when I saw that wasn’t happening, I was surprised to find no statements about running or not running validations. For example,see http://guides.rubyonrails.org/testing.html
Everything you pointed out (“the purpose of fixtures…”) makes sense. But I can also see that it would be useful to have a rake parm that lets the developer control whether or not validations are run on the fixtures.
From what I’ve been reading, and one of the reasons I’m finding Rails so appealing, is that (as DHH said) Rails is an opinionated framework and has a clear and strong stance on how to build good software. With that in mind, I was hoping to learn the reasons behind why fixtures work the way they do.
Thanks again for your response.