Factory_girl with Non-ActiveRecord classes

In earlier post we have seen how to test active record associations with factory girl. Now we will learn how factory girl works with non-active record classes. When we want to test external API responses, this will be useful.  By using this we can build no of responses at a time and test, how system … Continue reading Factory_girl with Non-ActiveRecord classes

Testing associations with factory girl

Associations are very important when we are working with relational databases. Writing relations in models is easy but when it comes testing them, it is a painful task. Factory girl associations makes this easy. Before going into details, lets get the basics right. What is Factory Girl?    Factory_girl is a fixtures replacement with a … Continue reading Testing associations with factory girl