purpose of Factory girl?

What's the purpose of using Factory girl?

Replace fixtures for creating data for your tests. As app gets bigger, fixtures become brittle. With Factory Girl (or Machinist) you can create just the test data you need for a given test.

Best Wishes,
Peter

Thanks - what exactly are fixtures? And do Factory Girl and Machinist
serve the same purpose?

You can get an idea about fixtures here: http://guides.rubyonrails.org/testing.html#the-low-down-on-fixtures

And the guides are a great resource to understand the basics about Rails.

Factory Girl and Machinist serve the same purpose but in my opinion it’s easier to generate data for your tests using them.

Check their pages to see more: https://github.com/notahat/machinist and https://github.com/thoughtbot/factory_girl_rails

Come on man - that's what google is for. Check out some of the 101 stuff so we can help with anything you can't get in 2 mind on google.

Best Wishes,
Peter

Thanks Carlos!

First read about testing. Once you know what testing is all will be clear.

Have a look through the Rails Guides.

Work through the free tutorial at railstutorial.org and many of the
basic things that you have been asking about will become clear. Other
things may become less clear of course :slight_smile:

Colin