Created
March 2, 2012 23:47
-
-
Save TwP/1962476 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
# In ruby you can implicitly continue a function call to the next line by | |
# breaking after the period. This is used to great advantage in RSpec files. | |
# | |
# I find that putting the "should" expectation on a new line makes the code | |
# more readable, and it ameliorates the 80 char line problem in tests. | |
describe "The::Dude" do | |
let(:dude) { The::Dude.new 'Jeffrey', 'Lebowski' } | |
it "should have a beverage" do | |
dude.favorite_beverage. | |
should be == "white russian" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment