Skip to content

Instantly share code, notes, and snippets.

@croaky
croaky / gist:2401393
Created April 16, 2012 20:43 — forked from kevinzen/gist:2400225
Advice on DRYing this test up?
FIREFOX_FIXTURES = [
{
browser: 'Firefox',
gecko_version: '20101203',
os: 'Intel Mac OS X 10.6',
platform: 'Macintosh',
raw: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13',
version: '3.6.13'
},
{
@croaky
croaky / thank-you.md
Created November 9, 2012 22:44 — forked from anonymous/thank-you.md
This Week in Open Source

This Week in Open Source

Thanks to this week's contributors to thoughtbot projects.

Test your Ruby gem against different versions of its dependencies.

avatar Joe Ferris

class Customer
def initialize(attrs = {})
@id = attrs[:id]
@country = attrs[:country]
end
def tax_code
TaxCodes[@country].call(@id)
rescue
raise "Tax codes for #{@country} not supported"