SandBox | ![]() |
|
2005-11-16 15:11:22 +0900
(7296d);
rev 4
class Dollar
attr_reader :amount
def initialize(amount)
@amount = 10
end
def times(multiplier)
end
end
if $0 == __FILE__
require 'test/unit'
class TestMoney < Test::Unit::TestCase
def test_multiplication
five = Dollar.new(5)
five.times(2)
assert_equal(10, five.amount)
end
end
end
テスト用のページです。 好きに使ってください。 |
メニュー特殊ページ
サイト管理人Related Pages |
system revision 1.162