Last active
August 30, 2016 14:03
-
-
Save subelsky/75d8161f5517c9467d77bce92b920107 to your computer and use it in GitHub Desktop.
Really simple Ruby test example
This file contains 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
class Adder | |
def add(a,b) | |
a + b | |
end | |
end | |
if __FILE__ == $0 | |
adder = Adder.new | |
result = adder.add(1,2) | |
if result == 3 | |
puts "OK" | |
else | |
abort "Expected 3, but got #{result}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment