Tag Archives: RailsCasts

Factory_Girl Validation Trouble

I ran into a dilemma with one of my rspec controller test suites while working on a personal website with book and author models.

It occurred as I was using the amazing factory_girl gem, which allows me to pre-define the attributes for a model into a factory to be used over and over again throughout my test suite. That way any time I need to fire up a test instance of a particular model, I can very easily with code like:

Continue reading

Tagged , ,