Skip to content

Instantly share code, notes, and snippets.

@dpickett
Created March 13, 2014 12:06
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 dpickett/0b132b74a78f1923cb76 to your computer and use it in GitHub Desktop.
Save dpickett/0b132b74a78f1923cb76 to your computer and use it in GitHub Desktop.
require 'rspec'
def greet(name)
"Hi #{name}"
end
describe "greeting function" do
it 'says "Hi Dan" when "Dan" is supplied' do
expect(greet("Dan")).to eq("Hi Dan")
end
it 'says "Hi Louise" when "Louise is supplied' do
expect(greet("Louise")).to eq("Hi Louise")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment