Ruby
Article

Watch: Managing Sample Data with Fixtures and Factories

By Ilya Bodrov-Krukowski

You’ve set up RSpec for your new Rails project but… what about data?

You can’t write many tests without having some sample data and therefore we need a way to deliver them! However, what would be the optimal solution? Should we type them by hand? Should we generate them somehow?

In this video you are going to learn about two ways of managing sample data: fixtures and factories. Apart from that, you’ll learn about annotate gem to add annotations for models and specs, and faker to easily generate fake data. Testing continues!

You can find code samples for this screencast on GitHub.

Loading the player…

  • http://SalaryNet30.com karen white56

    Google gives you a great opportunity to
    earn

    98652$/WEEk at your home .If you

    are some intelligent you make many more Dollars.I am

    also earning many more, my relatives wondered to see how i settle my

    Life in few days thank GOD to you for this…You can also make cash i

    never tell a lie you should check this I am sure you shocked to see

    this amazing offer…I’m Loving it!!!! ☻ ▼ ▼ ▼

    ————————————————————————————————-

    »»»»»»»»» Go to my Account For WE

    _xxxxxxxxxxxxx

Recommended

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in Ruby, once a week, for free.