Created
November 2, 2015 07:00
-
-
Save kangkyu/7561b8920f9196b437ae to your computer and use it in GitHub Desktop.
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
gem 'minitest', '>= 5.0.0' | |
require 'minitest/autorun' | |
def reverse(string) | |
result = "" | |
string.length.times do |i| | |
result = string[i] + result | |
end | |
result | |
end | |
class TestRev < Minitest::Test | |
def test_reverse | |
assert_equal "evissam", reverse("massive") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment