Skip to content

Instantly share code, notes, and snippets.

View lsaville's full-sized avatar

Lee Saville lsaville

  • Denver, CO
View GitHub Profile
@lsaville
lsaville / blog.md
Last active November 8, 2016 15:10

For those times when you want your tests looking good...

You might reach out to use factory girl because it's familiar. That makes sense. I felt the same way. Recently I worked to overcome that to learn a bit more about fabrication and what its all about. I'll share with you what I found.

Check out fabrication at it's slick website [fabrication.org][0] or on [github][1]. The setup is very familiar if you've dealt with factory girl, just toss the line in your gemfile and make a a sub-folder fabricators in your rails project's spec folder. From there you can create a file called fabricator.rb where the actual magic happens.

Additionally in my last project, I paired fabrication with [faker][2], a gem that spews out random data on command with fun categories like "hipster", "starwars", and "superhero". Again it's a simple add to your project's gemfile.

In Action

Module 1 Week 1 Diagnostic

This exercise is intended to help you assess your progress with the concepts and techniques we've covered during the week.

For these questions, write a short snippet of code that meets the requirement. Fill in your answers on a second sheet of paper or in your notebook. In cases where the question mentions a "given" data value, use the variable given to refer to it (instead of re-writing the information).

@lsaville
lsaville / ls-prework.md
Last active August 18, 2016 20:50 — forked from mbburch/prework.md
An example template for your Turing pre-work Gist

Turing School Prework - Lee Saville

Task A- Practice Typing:

  • screenshots of scores will be posted in comments

Task B- Algorithmic Thinking & Logic:

  • screenshots of completed sections will be posted in comments

Task C- Create your Gist:

....aaaaand here it is!