Skip to content

Instantly share code, notes, and snippets.

@domgetter
Created August 12, 2015 07:40
Show Gist options
  • Save domgetter/3df083f4f2e255f944dd to your computer and use it in GitHub Desktop.
Save domgetter/3df083f4f2e255f944dd to your computer and use it in GitHub Desktop.
def assert_equals(a, b)
if a == b
puts "Hooray!"
else
puts "It wasn't what you wanted!"
end
end
class Object
def do_something
@value = 3
end
def value
@value
end
end
obj = Object.new
obj.do_something
expected_value = 3
assert_equals(obj.value, expected_value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment