Skip to content

Instantly share code, notes, and snippets.

View alto's full-sized avatar

Thorsten Böttger alto

View GitHub Profile
# your_object.rb
class YourObject < ActiveRecord::Base
def your_method
self.your_association << TestObject.new
end
end
# your_object_spec.rb
it "should test your_method" do
lambda { your_object.your_method }.should change(your_object.your_association, :size) # => no change, test fails....
require 'rubygems'
require 'yaml'
# A demonstration of YAML anchors, references and handling of nested values
# For more info, see:
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
stooges = YAML::load( File.read('stooges.yml') )
# => {
# "default" => {

Keybase proof

I hereby claim:

  • I am alto on github.
  • I am alto (https://keybase.io/alto) on keybase.
  • I have a public key whose fingerprint is C0DC 3131 6C29 B56A FD32 9F87 C8BE F36F FC44 C1BB

To claim this, I am signing this object: