paramix 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{HISTORY → HISTORY.rdoc} +16 -0
- data/LICENSE +17 -668
- data/README.rdoc +25 -42
- data/Syckfile +87 -0
- data/lib/paramix.rb +81 -155
- data/meta/version +1 -1
- data/test/nested/test_nested_both.rb +26 -14
- data/test/nested/test_nested_bottom.rb +15 -11
- data/test/nested/test_nested_moot.rb +48 -0
- data/test/nested/test_nested_simple.rb +41 -0
- data/test/nested/test_nested_top.rb +19 -10
- data/test/test_paramix_callback.rb +16 -9
- data/test/test_paramix_extend.rb +7 -3
- data/test/test_paramix_include.rb +7 -3
- data/test/test_paramix_namespace.rb +11 -11
- metadata +10 -7
- data/test/test_paramix_inject.rb +0 -36
data/test/test_paramix_inject.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
require 'paramix'
|
2
|
-
require 'test/unit'
|
3
|
-
|
4
|
-
class TC_Paramix_Inject < Test::Unit::TestCase
|
5
|
-
|
6
|
-
# -- fixture ------------------------------
|
7
|
-
|
8
|
-
module O
|
9
|
-
def self.[](parameters)
|
10
|
-
Paramix::Proxy.new(self, parameters) do
|
11
|
-
attr_accessor mixin_parameters[O][:name] #mixin_params(O, :name)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
class X
|
17
|
-
include O[:name=>"x"]
|
18
|
-
end
|
19
|
-
|
20
|
-
# -- tests --------------------------------
|
21
|
-
|
22
|
-
def test_attribute
|
23
|
-
o = X.new
|
24
|
-
assert_nothing_raised{ o.x = 10 }
|
25
|
-
assert_equal(10, o.x)
|
26
|
-
end
|
27
|
-
|
28
|
-
def test_ancestors
|
29
|
-
assert(X.ancestors.include?(X))
|
30
|
-
assert(X.ancestors.include?(O))
|
31
|
-
assert(X.ancestors.include?(Object))
|
32
|
-
assert(X.ancestors.include?(Kernel))
|
33
|
-
end
|
34
|
-
|
35
|
-
end
|
36
|
-
|