paramix 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
-