Skip to content

Instantly share code, notes, and snippets.

@chrishunt
Created March 6, 2012 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrishunt/1982564 to your computer and use it in GitHub Desktop.
Save chrishunt/1982564 to your computer and use it in GitHub Desktop.
RSpec Let
describe 'rspec' do
let(:sentance) { 'hello' }
it "returns 'hello'" do
sentance.should == 'hello'
end
context 'with another word' do
let(:sentance) { sentance + ' world' }
it 'blows up the stack' do
sentance.should == 'hello world'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment