Skip to content

Instantly share code, notes, and snippets.

@xli
xli / writing-great-tests-consistently.md
Last active August 27, 2015 02:43 — forked from searls/writing-great-tests-consistently.md
Talk abstract for fall 2015 (rewritten to fit Ruby conferences more clearly)

Title

How to Start Writing Great Tests—Consistently!

Abstract

Your app is a unique snowflake. Your tests are too… but they shouldn't be!

Years helping teams write better tests has taught me one thing: consistency is crucial. Inconsistent tests slow teams down, wasting time to understand how each test works. Deciding on conventions—even arbitrary ones—can prevent tremendous pain later.

This talk will introduce a ready-to-fork Test Style Guide of carefully-considered rules and templates for Rubyists. You can customize it to fit your preferred tools, too. Soon, you'll be on your way to having more consistent tests that are much more fun to maintain!

@xli
xli / gist:77242
Created March 11, 2009 01:20 — forked from chad/gist:76951
# How to find out where a method comes from.
# Learned this from Dave Thomas while teaching Advanced Ruby Studio
# Makes the case for separating method definitions into
# modules, especially when enhancing built-in classes.
module Perpetrator
def crime
end
end
class Fixnum