Created
August 12, 2015 07:40
-
-
Save domgetter/3df083f4f2e255f944dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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