Skip to content

Instantly share code, notes, and snippets.

@techbelly
Created April 14, 2011 08:57
Show Gist options
  • Save techbelly/919147 to your computer and use it in GitHub Desktop.
Save techbelly/919147 to your computer and use it in GitHub Desktop.
## Isn't this...
#
let :a_record do
SomeObject.new
end
it "should" do
a_record.do_something
a_record.do_something_else
end
## Exactly equivalent to this, but less obvious...
def a_record
Someobject.new
end
test "should do something"
rec = a_record
rec.do_something
rec.do_something_else
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment