Last active
April 5, 2020 06:41
-
-
Save k2works/ee1698c9b28e7e9e7488872d0600537e to your computer and use it in GitHub Desktop.
Ruby TDD Startter
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
# Test::Unit | |
require 'test/unit' | |
class TestAdd < Test::Unit::TestCase | |
def setup;end | |
def test_add | |
assert_equal 5, add(2,2) | |
end | |
end | |
# Minitest | |
require 'minitest/autorun' | |
class MiniTestAdd < Minitest::Test | |
def setup;end | |
def test_add | |
assert_equal 5, add(2, 2) | |
end | |
end | |
def add(a, b) | |
a + b | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment