Skip to content

Instantly share code, notes, and snippets.

View cjse's full-sized avatar

CJ Kihlbom cjse

View GitHub Profile
@cjse
cjse / introductin_letterpress_the_model_facory_for_the_lazy_people.md Yet another fixture replacement model factory gem - Introducing Letterpress

Title: Introduction Letterpress - the model factory for the lazy people.

Why yet another model factory gem?

In this blog post I will try to explain what my goals are for Letterpress.

No DSL

As a consultant I have worked on many different Rails projects and most of them use model factories to populate their models with default values. I love to use model factories when writing tests. But I have one concern: I have to learn yet another DSL to be able to populate my models with default values. That feels wrong to me.

@cjse
cjse / gist:4196
Created August 6, 2008 09:22 — forked from defunkt/gist:4169
# by bryan helmkamp with slight modification by chris wanstrath
# from http://www.brynary.com/2008/8/3/our-git-deployment-workflow
module GitCommands
extend self
def diff_staging
`git fetch`
puts `git diff origin/production origin/staging`
end