Skip to content

Instantly share code, notes, and snippets.

@TwP
Created March 2, 2012 23:47
Show Gist options
  • Save TwP/1962476 to your computer and use it in GitHub Desktop.
Save TwP/1962476 to your computer and use it in GitHub Desktop.
# 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