1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/test_delegate.rb: add new test file for delegate.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2008-01-16 08:36:56 +00:00
parent fe5b495f88
commit 3009bcb679
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Wed Jan 16 17:36:26 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* test/test_delegate.rb: add new test file for delegate.rb.
Wed Jan 16 16:14:00 2008 Akinori MUSHA <knu@iDaemons.org>
* ruby.1: Fix grammar.

15
test/test_delegate.rb Normal file
View file

@ -0,0 +1,15 @@
require 'test/unit'
require 'delegate'
class TestDelegateClass < Test::Unit::TestCase
module M
attr_reader :m
end
def test_extend
obj = DelegateClass(Array).new([])
obj.instance_eval { @m = :m }
obj.extend M
assert_equal(:m, obj.m, "[ruby-dev:33116]")
end
end