Skip to content

Instantly share code, notes, and snippets.

@anoxic
Last active December 17, 2015 05:29
Show Gist options
  • Save anoxic/5558491 to your computer and use it in GitHub Desktop.
Save anoxic/5558491 to your computer and use it in GitHub Desktop.
class Person
def initialize(name)
@name = name
end
def greet
"Hi there, #{@name}!"
end
end
end
require "./hello"
describe Person do
it "greets a person" do
person = Person.new("Bob")
person.greet.should == "Hi there, Bob!"
end
it "greets another person" do
person = Person.new("Sally")
person.greet.should == "Hi there, Sally!"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment