Skip to content

Instantly share code, notes, and snippets.

@kangkyu
Created November 2, 2015 07:00
Show Gist options
  • Save kangkyu/7561b8920f9196b437ae to your computer and use it in GitHub Desktop.
Save kangkyu/7561b8920f9196b437ae to your computer and use it in GitHub Desktop.
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