Skip to content

Instantly share code, notes, and snippets.

View justinokamoto's full-sized avatar

Justin justinokamoto

  • Amazon
  • Seattle, Washington
View GitHub Profile
@jwo
jwo / dr_spec.rb
Created February 29, 2012 16:54
DRY Mongoid modules
#http://jessewolgamott.com/blog2012/02/29/the-one-where-we-dry-up-mongoid-and-rspec-using-shared-examples-and-modules/
require 'spec_helper'
module Contactable
def self.included(receiver)
receiver.class_eval do
field :first_name, type: String
field :last_name, type: String