⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (555 Bytes)
Bug #7045
ยป delegate_class_test.rb
Anonymous, 09/22/2012 02:56 AM
require
'test/unit'
require
'delegate'
class
DelegateClassExample
<
DelegateClass
(
Object
)
end
class
TestDelegateClass
<
Test
::
Unit
::
TestCase
def
test_array_subtraction
obj
=
DelegateClassExample
.
new
(
Object
.
new
)
assert_equal
([],
[
obj
]
-
[
obj
])
end
def
test_nested_array_subtraction
obj
=
DelegateClassExample
.
new
(
Object
.
new
)
assert_equal
([],
[[
obj
]]
-
[[
obj
]])
end
def
test_alternate_test_nested_array_subtraction
obj
=
DelegateClassExample
.
new
(
Object
.
new
)
array
=
[[
obj
]]
assert_equal
([],
array
-
array
)
end
end
(1-1/1)
Loading...