Created
April 14, 2011 08:57
-
-
Save techbelly/919147 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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