Skip to content

Instantly share code, notes, and snippets.

@tomoyamkung
Created August 10, 2012 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomoyamkung/3313797 to your computer and use it in GitHub Desktop.
Save tomoyamkung/3313797 to your computer and use it in GitHub Desktop.
[Ruby]Test::Unit を使ったテストケースの雛型
#! ruby
#-*- encoding: utf-8 -*-
require 'test/unit'
require 'hoge'
class HogeTest < Test::Unit::TestCase
def setup
@obj = Hoge.new
end
def test_get
assert_nil(@obj.get())
assert_equal(1, @obj.get("1"))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment