vedeu 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +40 -0
  3. data/README.md +1 -0
  4. data/docs/dsl.md +24 -24
  5. data/lib/vedeu/all.rb +21 -44
  6. data/lib/vedeu/api.rb +13 -13
  7. data/lib/vedeu/application/application_controller.rb +2 -0
  8. data/lib/vedeu/bindings/movement.rb +53 -18
  9. data/lib/vedeu/bindings/refresh.rb +1 -1
  10. data/lib/vedeu/bindings/system.rb +2 -2
  11. data/lib/vedeu/bindings/visibility.rb +3 -3
  12. data/lib/vedeu/borders/all.rb +13 -0
  13. data/lib/vedeu/borders/border.rb +209 -202
  14. data/lib/vedeu/{dsl/border.rb → borders/dsl.rb} +15 -15
  15. data/lib/vedeu/{null/border.rb → borders/null.rb} +9 -9
  16. data/lib/vedeu/borders/render.rb +347 -0
  17. data/lib/vedeu/borders/repository.rb +19 -0
  18. data/lib/vedeu/buffers/all.rb +13 -0
  19. data/lib/vedeu/buffers/buffer.rb +182 -176
  20. data/lib/vedeu/{null/buffer.rb → buffers/null.rb} +8 -8
  21. data/lib/vedeu/buffers/repository.rb +24 -0
  22. data/lib/vedeu/buffers/virtual_buffer.rb +2 -2
  23. data/lib/vedeu/cursors/all.rb +11 -0
  24. data/lib/vedeu/cursors/cursor.rb +276 -0
  25. data/lib/vedeu/cursors/refresh.rb +84 -0
  26. data/lib/vedeu/cursors/repository.rb +34 -0
  27. data/lib/vedeu/dsl/interface.rb +9 -9
  28. data/lib/vedeu/dsl/shared.rb +11 -11
  29. data/lib/vedeu/{exceptions.rb → error.rb} +2 -2
  30. data/lib/vedeu/esc/esc.rb +1 -1
  31. data/lib/vedeu/geometry/all.rb +18 -0
  32. data/lib/vedeu/geometry/area.rb +170 -160
  33. data/lib/vedeu/geometry/coordinate.rb +61 -39
  34. data/lib/vedeu/geometry/dimension.rb +139 -132
  35. data/lib/vedeu/{dsl/geometry.rb → geometry/dsl.rb} +11 -11
  36. data/lib/vedeu/geometry/generic_coordinate.rb +159 -153
  37. data/lib/vedeu/geometry/geometry.rb +310 -212
  38. data/lib/vedeu/geometry/grid.rb +73 -69
  39. data/lib/vedeu/{null/geometry.rb → geometry/null.rb} +10 -10
  40. data/lib/vedeu/geometry/position.rb +124 -120
  41. data/lib/vedeu/geometry/repository.rb +19 -0
  42. data/lib/vedeu/input/editor/document.rb +2 -2
  43. data/lib/vedeu/internal_api.rb +8 -8
  44. data/lib/vedeu/models/escape.rb +2 -2
  45. data/lib/vedeu/models/interface.rb +1 -1
  46. data/lib/vedeu/models/page.rb +89 -0
  47. data/lib/vedeu/models/row.rb +66 -0
  48. data/lib/vedeu/models/toggleable.rb +1 -1
  49. data/lib/vedeu/models/views/char.rb +7 -6
  50. data/lib/vedeu/models/views/line.rb +1 -1
  51. data/lib/vedeu/models/views/view.rb +2 -2
  52. data/lib/vedeu/options.rb +19 -0
  53. data/lib/vedeu/output/clear/named_interface.rb +1 -1
  54. data/lib/vedeu/output/direct.rb +1 -1
  55. data/lib/vedeu/output/presentation.rb +2 -1
  56. data/lib/vedeu/output/viewport.rb +3 -3
  57. data/lib/vedeu/repositories/model.rb +9 -1
  58. data/lib/vedeu/repositories/repository.rb +5 -0
  59. data/lib/vedeu/terminal/terminal.rb +3 -3
  60. data/lib/vedeu/version.rb +1 -1
  61. data/test/lib/vedeu/borders/border_test.rb +299 -291
  62. data/test/lib/vedeu/{dsl/border_test.rb → borders/dsl_test.rb} +6 -6
  63. data/test/lib/vedeu/{null/border_test.rb → borders/null_test.rb} +6 -6
  64. data/test/lib/vedeu/borders/render_test.rb +125 -0
  65. data/test/lib/vedeu/borders/repository_test.rb +17 -0
  66. data/test/lib/vedeu/buffers/buffer_test.rb +116 -112
  67. data/test/lib/vedeu/{null/buffer_test.rb → buffers/null_test.rb} +5 -5
  68. data/test/lib/vedeu/buffers/repository_test.rb +18 -0
  69. data/test/lib/vedeu/cursors/cursor_test.rb +370 -0
  70. data/test/lib/vedeu/cursors/refresh_test.rb +69 -0
  71. data/test/lib/vedeu/cursors/repository_test.rb +41 -0
  72. data/test/lib/vedeu/dsl/interface_test.rb +5 -5
  73. data/test/lib/vedeu/{exceptions_test.rb → error_test.rb} +0 -0
  74. data/test/lib/vedeu/geometry/area_test.rb +141 -137
  75. data/test/lib/vedeu/geometry/coordinate_test.rb +93 -89
  76. data/test/lib/vedeu/geometry/dimension_test.rb +137 -133
  77. data/test/lib/vedeu/{dsl/geometry_test.rb → geometry/dsl_test.rb} +17 -17
  78. data/test/lib/vedeu/geometry/generic_coordinate_test.rb +32 -28
  79. data/test/lib/vedeu/geometry/geometry_test.rb +282 -157
  80. data/test/lib/vedeu/geometry/grid_test.rb +35 -31
  81. data/test/lib/vedeu/{null/geometry_test.rb → geometry/null_test.rb} +5 -5
  82. data/test/lib/vedeu/geometry/position_test.rb +146 -142
  83. data/test/lib/vedeu/geometry/repository_test.rb +19 -0
  84. data/test/lib/vedeu/input/editor/document_test.rb +1 -1
  85. data/test/lib/vedeu/models/escape_test.rb +1 -1
  86. data/test/lib/vedeu/models/interface_test.rb +2 -2
  87. data/test/lib/vedeu/models/page_test.rb +235 -0
  88. data/test/lib/vedeu/models/row_test.rb +111 -0
  89. data/test/lib/vedeu/models/views/char_test.rb +3 -3
  90. data/test/lib/vedeu/options_test.rb +57 -0
  91. data/test/lib/vedeu/output/clear/named_interface_test.rb +1 -1
  92. data/test/lib/vedeu/output/renderers/json_test.rb +1 -1
  93. data/test/lib/vedeu/output/viewport_test.rb +15 -9
  94. data/test/lib/vedeu/refresh/refresh_buffer_test.rb +12 -12
  95. data/test/lib/vedeu/repositories/repositories_test.rb +1 -1
  96. data/test/lib/vedeu/repositories/repository_test.rb +7 -0
  97. data/test/lib/vedeu/terminal/terminal_test.rb +1 -1
  98. data/test/test_helper.rb +1 -1
  99. data/vedeu.gemspec +2 -2
  100. metadata +57 -63
  101. data/lib/vedeu/borders/borders.rb +0 -15
  102. data/lib/vedeu/borders/render_border.rb +0 -331
  103. data/lib/vedeu/buffers/buffers.rb +0 -20
  104. data/lib/vedeu/cursor/cursor.rb +0 -174
  105. data/lib/vedeu/cursor/cursors.rb +0 -30
  106. data/lib/vedeu/cursor/move.rb +0 -239
  107. data/lib/vedeu/cursor/reposition.rb +0 -78
  108. data/lib/vedeu/geometry/geometries.rb +0 -15
  109. data/lib/vedeu/refresh/refresh_cursor.rb +0 -92
  110. data/test/lib/vedeu/borders/borders_test.rb +0 -13
  111. data/test/lib/vedeu/borders/render_border_test.rb +0 -121
  112. data/test/lib/vedeu/buffers/buffers_test.rb +0 -14
  113. data/test/lib/vedeu/cursor/cursor_test.rb +0 -246
  114. data/test/lib/vedeu/cursor/cursors_test.rb +0 -37
  115. data/test/lib/vedeu/cursor/move_test.rb +0 -301
  116. data/test/lib/vedeu/cursor/reposition_test.rb +0 -63
  117. data/test/lib/vedeu/geometry/geometries_test.rb +0 -15
  118. data/test/lib/vedeu/refresh/refresh_cursor_test.rb +0 -65
@@ -2,187 +2,191 @@ require 'test_helper'
2
2
 
3
3
  module Vedeu
4
4
 
5
- describe Dimension do
6
-
7
- let(:described) { Vedeu::Dimension }
8
- let(:instance) { described.new(attributes) }
9
- let(:attributes) {
10
- {
11
- d: d,
12
- dn: dn,
13
- d_dn: d_dn,
14
- default: default,
15
- maximised: maximised,
16
- centred: centred,
5
+ module Geometry
6
+
7
+ describe Dimension do
8
+
9
+ let(:described) { Vedeu::Geometry::Dimension }
10
+ let(:instance) { described.new(attributes) }
11
+ let(:attributes) {
12
+ {
13
+ d: d,
14
+ dn: dn,
15
+ d_dn: d_dn,
16
+ default: default,
17
+ maximised: maximised,
18
+ centred: centred,
19
+ }
17
20
  }
18
- }
19
- let(:d) {}
20
- let(:dn) {}
21
- let(:d_dn) {}
22
- let(:default) {}
23
- let(:maximised) {}
24
- let(:centred) {}
25
-
26
- describe '#initialize' do
27
- it { instance.must_be_instance_of(described) }
28
- it { instance.instance_variable_get('@d').must_equal(d) }
29
- it { instance.instance_variable_get('@dn').must_equal(dn) }
30
- it { instance.instance_variable_get('@d_dn').must_equal(d_dn) }
31
- it { instance.instance_variable_get('@default').must_equal(default) }
32
- it { instance.instance_variable_get('@maximised').must_equal(maximised) }
33
- it { instance.instance_variable_get('@centred').must_equal(centred) }
34
- end
35
-
36
- describe '.pair' do
37
- let(:d) { 15 }
38
- let(:dn) { 38 }
39
-
40
- subject { described.pair(attributes) }
41
-
42
- it { subject.must_be_instance_of(Array) }
43
- it { subject.must_equal([15, 38]) }
44
-
45
- context 'when maximised' do
46
- let(:maximised) { true }
47
- let(:default) { 80 }
48
-
49
- it { subject.must_equal([1, 80]) }
21
+ let(:d) {}
22
+ let(:dn) {}
23
+ let(:d_dn) {}
24
+ let(:default) {}
25
+ let(:maximised) {}
26
+ let(:centred) {}
27
+
28
+ describe '#initialize' do
29
+ it { instance.must_be_instance_of(described) }
30
+ it { instance.instance_variable_get('@d').must_equal(d) }
31
+ it { instance.instance_variable_get('@dn').must_equal(dn) }
32
+ it { instance.instance_variable_get('@d_dn').must_equal(d_dn) }
33
+ it { instance.instance_variable_get('@default').must_equal(default) }
34
+ it { instance.instance_variable_get('@maximised').must_equal(maximised) }
35
+ it { instance.instance_variable_get('@centred').must_equal(centred) }
50
36
  end
51
37
 
52
- context 'when centred and a length can be determined' do
53
- let(:centred) { true }
54
- let(:default) { 80 }
38
+ describe '.pair' do
39
+ let(:d) { 15 }
40
+ let(:dn) { 38 }
55
41
 
56
- context 'when d and dn are given' do
57
- let(:d) { 7 }
58
- let(:dn) { 47 }
42
+ subject { described.pair(attributes) }
59
43
 
60
- it { subject.must_equal([20, 60]) }
61
- end
44
+ it { subject.must_be_instance_of(Array) }
45
+ it { subject.must_equal([15, 38]) }
62
46
 
63
- context 'when only a d_dn is given' do
64
- let(:d_dn) { 30 }
47
+ context 'when maximised' do
48
+ let(:maximised) { true }
49
+ let(:default) { 80 }
65
50
 
66
- it { subject.must_equal([28, 52]) }
51
+ it { subject.must_equal([1, 80]) }
67
52
  end
68
53
 
69
- context 'when only a default is given' do
70
- it { subject.must_equal([28, 52]) }
71
- end
72
- end
73
- end
54
+ context 'when centred and a length can be determined' do
55
+ let(:centred) { true }
56
+ let(:default) { 80 }
74
57
 
75
- describe '#d1' do
76
- subject { instance.d1 }
58
+ context 'when d and dn are given' do
59
+ let(:d) { 7 }
60
+ let(:dn) { 47 }
77
61
 
78
- it { subject.must_be_instance_of(Fixnum) }
62
+ it { subject.must_equal([20, 60]) }
63
+ end
79
64
 
80
- context 'when not centred and/or a length cannot be determined' do
81
- context 'when d is given' do
82
- let(:d) { 5 }
65
+ context 'when only a d_dn is given' do
66
+ let(:d_dn) { 30 }
83
67
 
84
- it { subject.must_equal(5) }
85
- end
68
+ it { subject.must_equal([28, 52]) }
69
+ end
86
70
 
87
- context 'when d is not given' do
88
- it { subject.must_equal(1) }
71
+ context 'when only a default is given' do
72
+ it { subject.must_equal([28, 52]) }
73
+ end
89
74
  end
90
75
  end
91
76
 
92
- context 'when centred and a length can be determined' do
93
- let(:centred) { true }
94
- let(:default) { 80 }
77
+ describe '#d1' do
78
+ subject { instance.d1 }
95
79
 
96
- context 'when d and dn are given' do
97
- let(:d) { 7 }
98
- let(:dn) { 47 }
80
+ it { subject.must_be_instance_of(Fixnum) }
99
81
 
100
- it { subject.must_equal(20) }
101
- end
82
+ context 'when not centred and/or a length cannot be determined' do
83
+ context 'when d is given' do
84
+ let(:d) { 5 }
102
85
 
103
- context 'when only a d_dn is given' do
104
- let(:d_dn) { 30 }
86
+ it { subject.must_equal(5) }
87
+ end
105
88
 
106
- it { subject.must_equal(25) }
89
+ context 'when d is not given' do
90
+ it { subject.must_equal(1) }
91
+ end
107
92
  end
108
93
 
109
- context 'when only a default is given' do
110
- it { subject.must_equal(1) }
94
+ context 'when centred and a length can be determined' do
95
+ let(:centred) { true }
96
+ let(:default) { 80 }
97
+
98
+ context 'when d and dn are given' do
99
+ let(:d) { 7 }
100
+ let(:dn) { 47 }
101
+
102
+ it { subject.must_equal(20) }
103
+ end
104
+
105
+ context 'when only a d_dn is given' do
106
+ let(:d_dn) { 30 }
107
+
108
+ it { subject.must_equal(25) }
109
+ end
110
+
111
+ context 'when only a default is given' do
112
+ it { subject.must_equal(1) }
113
+ end
111
114
  end
112
115
  end
113
- end
114
116
 
115
- describe '#d2' do
116
- subject { instance.d2 }
117
+ describe '#d2' do
118
+ subject { instance.d2 }
117
119
 
118
- context 'when not centred and/or a length cannot be determined' do
119
- context 'when d and dn are given' do
120
- let(:d) { 5 }
121
- let(:dn) { 8 }
120
+ context 'when not centred and/or a length cannot be determined' do
121
+ context 'when d and dn are given' do
122
+ let(:d) { 5 }
123
+ let(:dn) { 8 }
122
124
 
123
- it { subject.must_equal(8) }
124
- end
125
+ it { subject.must_equal(8) }
126
+ end
125
127
 
126
- context 'when d and d_dn are given' do
127
- let(:d) { 5 }
128
- let(:d_dn) { 2 }
128
+ context 'when d and d_dn are given' do
129
+ let(:d) { 5 }
130
+ let(:d_dn) { 2 }
129
131
 
130
- it { subject.must_equal(6) }
131
- end
132
+ it { subject.must_equal(6) }
133
+ end
132
134
 
133
- context 'when only d_dn is given' do
134
- let(:d_dn) { 6 }
135
+ context 'when only d_dn is given' do
136
+ let(:d_dn) { 6 }
135
137
 
136
- it { subject.must_equal(6) }
137
- end
138
+ it { subject.must_equal(6) }
139
+ end
138
140
 
139
- context 'when only dn is given' do
140
- let(:dn) { 8 }
141
+ context 'when only dn is given' do
142
+ let(:dn) { 8 }
141
143
 
142
- it { subject.must_equal(8) }
143
- end
144
+ it { subject.must_equal(8) }
145
+ end
144
146
 
145
- context 'when d and a default is given' do
146
- let(:d) { 1 }
147
- let(:default) { 40 }
147
+ context 'when d and a default is given' do
148
+ let(:d) { 1 }
149
+ let(:default) { 40 }
148
150
 
149
- it { subject.must_equal(40) }
150
- end
151
+ it { subject.must_equal(40) }
152
+ end
151
153
 
152
- context 'when only a default is given' do
153
- let(:default) { 25 }
154
+ context 'when only a default is given' do
155
+ let(:default) { 25 }
154
156
 
155
- it { subject.must_equal(25) }
156
- end
157
+ it { subject.must_equal(25) }
158
+ end
157
159
 
158
- context 'when no default is given' do
159
- it { subject.must_equal(nil) }
160
+ context 'when no default is given' do
161
+ it { subject.must_equal(nil) }
162
+ end
160
163
  end
161
- end
162
164
 
163
- context 'when centred and a length can be determined' do
164
- let(:centred) { true }
165
- let(:default) { 80 }
165
+ context 'when centred and a length can be determined' do
166
+ let(:centred) { true }
167
+ let(:default) { 80 }
166
168
 
167
- context 'when d and dn are given' do
168
- let(:d) { 7 }
169
- let(:dn) { 47 }
169
+ context 'when d and dn are given' do
170
+ let(:d) { 7 }
171
+ let(:dn) { 47 }
170
172
 
171
- it { subject.must_equal(60) }
172
- end
173
+ it { subject.must_equal(60) }
174
+ end
173
175
 
174
- context 'when only a d_dn is given' do
175
- let(:d_dn) { 30 }
176
+ context 'when only a d_dn is given' do
177
+ let(:d_dn) { 30 }
176
178
 
177
- it { subject.must_equal(55) }
178
- end
179
+ it { subject.must_equal(55) }
180
+ end
179
181
 
180
- context 'when only a default is given' do
181
- it { subject.must_equal(80) }
182
+ context 'when only a default is given' do
183
+ it { subject.must_equal(80) }
184
+ end
182
185
  end
183
186
  end
184
- end
185
187
 
186
- end # Dimension
188
+ end # Dimension
189
+
190
+ end # Geometry
187
191
 
188
192
  end # Vedeu
@@ -2,13 +2,13 @@ require 'test_helper'
2
2
 
3
3
  module Vedeu
4
4
 
5
- module DSL
5
+ module Geometry
6
6
 
7
- describe Geometry do
7
+ describe DSL do
8
8
 
9
- let(:described) { Vedeu::DSL::Geometry }
9
+ let(:described) { Vedeu::Geometry::DSL }
10
10
  let(:instance) { described.new(model) }
11
- let(:model) { Vedeu::Geometry.new }
11
+ let(:model) { Vedeu::Geometry::Geometry.new }
12
12
 
13
13
  describe '#initialize' do
14
14
  it { instance.must_be_instance_of(described) }
@@ -36,7 +36,7 @@ module Vedeu
36
36
  end
37
37
  }
38
38
 
39
- it { subject.must_be_instance_of(Vedeu::Geometry) }
39
+ it { subject.must_be_instance_of(Vedeu::Geometry::Geometry) }
40
40
 
41
41
  it 'allows the use of centred within geometry' do
42
42
  subject.centred.must_equal(false)
@@ -90,7 +90,7 @@ module Vedeu
90
90
  end
91
91
  }
92
92
 
93
- it { subject.must_be_instance_of(Vedeu::Geometry) }
93
+ it { subject.must_be_instance_of(Vedeu::Geometry::Geometry) }
94
94
 
95
95
  it 'allows the use of height within geometry' do
96
96
  subject.height.must_equal(17)
@@ -153,7 +153,7 @@ module Vedeu
153
153
  end
154
154
  }
155
155
 
156
- it { subject.must_be_instance_of(Vedeu::Geometry) }
156
+ it { subject.must_be_instance_of(Vedeu::Geometry::Geometry) }
157
157
 
158
158
  it 'allows the use of width within geometry' do
159
159
  subject.width.must_equal(29)
@@ -172,7 +172,7 @@ module Vedeu
172
172
 
173
173
  context 'when a block is given' do
174
174
  subject {
175
- Vedeu::Geometry.build({}) do
175
+ Vedeu::Geometry::Geometry.build({}) do
176
176
  x do
177
177
  3 + 4
178
178
  end
@@ -189,7 +189,7 @@ module Vedeu
189
189
  end
190
190
  }
191
191
 
192
- it { subject.must_be_instance_of(Vedeu::Geometry) }
192
+ it { subject.must_be_instance_of(Vedeu::Geometry::Geometry) }
193
193
 
194
194
  it 'allows the use of x within geometry' do
195
195
  subject.x.must_equal(9)
@@ -207,7 +207,7 @@ module Vedeu
207
207
 
208
208
  context 'when a block is given' do
209
209
  subject {
210
- Vedeu::Geometry.build({}) do
210
+ Vedeu::Geometry::Geometry.build({}) do
211
211
  x do
212
212
  8 + 8
213
213
  end
@@ -230,7 +230,7 @@ module Vedeu
230
230
 
231
231
  context 'when a block is given' do
232
232
  subject {
233
- Vedeu::Geometry.build({}) do
233
+ Vedeu::Geometry::Geometry.build({}) do
234
234
  y do
235
235
  2 + 7
236
236
  end
@@ -247,7 +247,7 @@ module Vedeu
247
247
  end
248
248
  }
249
249
 
250
- it { subject.must_be_instance_of(Vedeu::Geometry) }
250
+ it { subject.must_be_instance_of(Vedeu::Geometry::Geometry) }
251
251
 
252
252
  it 'allows the use of y within geometry' do
253
253
  subject.y.must_equal(4)
@@ -265,7 +265,7 @@ module Vedeu
265
265
 
266
266
  context 'when a block is given' do
267
267
  subject {
268
- Vedeu::Geometry.build({}) do
268
+ Vedeu::Geometry::Geometry.build({}) do
269
269
  y do
270
270
  8 + 8
271
271
  end
@@ -285,7 +285,7 @@ module Vedeu
285
285
 
286
286
  context 'when a block is given' do
287
287
  subject {
288
- Vedeu::Geometry.build({}) do
288
+ Vedeu::Geometry::Geometry.build({}) do
289
289
  xn do
290
290
  8 + 8
291
291
  end
@@ -304,7 +304,7 @@ module Vedeu
304
304
 
305
305
  context 'when a block is given' do
306
306
  subject {
307
- Vedeu::Geometry.build({}) do
307
+ Vedeu::Geometry::Geometry.build({}) do
308
308
  yn do
309
309
  5 + 4
310
310
  end
@@ -315,8 +315,8 @@ module Vedeu
315
315
  end
316
316
  end
317
317
 
318
- end # Geometry
318
+ end # DSL
319
319
 
320
- end # DSL
320
+ end # Geometry
321
321
 
322
322
  end # Vedeu
@@ -2,40 +2,44 @@ require 'test_helper'
2
2
 
3
3
  module Vedeu
4
4
 
5
- describe GenericCoordinate do
6
-
7
- let(:described) { Vedeu::GenericCoordinate }
8
- let(:instance) { described.new(attributes) }
9
- let(:attributes) {
10
- {
11
- name: _name,
12
- offset: offset,
13
- type: type,
5
+ module Geometry
6
+
7
+ describe GenericCoordinate do
8
+
9
+ let(:described) { Vedeu::Geometry::GenericCoordinate }
10
+ let(:instance) { described.new(attributes) }
11
+ let(:attributes) {
12
+ {
13
+ name: _name,
14
+ offset: offset,
15
+ type: type,
16
+ }
14
17
  }
15
- }
16
- let(:_name) {}
17
- let(:offset) {}
18
- let(:type) {}
18
+ let(:_name) {}
19
+ let(:offset) {}
20
+ let(:type) {}
19
21
 
20
- describe '#initialize' do
21
- it { instance.must_be_instance_of(described) }
22
- it { instance.instance_variable_get('@name').must_equal(_name) }
23
- it { instance.instance_variable_get('@offset').must_equal(offset) }
24
- it { instance.instance_variable_get('@type').must_equal(type) }
25
- end
22
+ describe '#initialize' do
23
+ it { instance.must_be_instance_of(described) }
24
+ it { instance.instance_variable_get('@name').must_equal(_name) }
25
+ it { instance.instance_variable_get('@offset').must_equal(offset) }
26
+ it { instance.instance_variable_get('@type').must_equal(type) }
27
+ end
26
28
 
27
- describe '#dn' do
28
- subject { instance.dn }
29
+ describe '#dn' do
30
+ subject { instance.dn }
29
31
 
30
- # it { skip }
31
- end
32
+ # it { skip }
33
+ end
32
34
 
33
- describe '#position' do
34
- subject { instance.position }
35
+ describe '#position' do
36
+ subject { instance.position }
35
37
 
36
- # it { skip }
37
- end
38
+ # it { skip }
39
+ end
38
40
 
39
- end # GenericCoordinate
41
+ end # GenericCoordinate
42
+
43
+ end # Geometry
40
44
 
41
45
  end # Vedeu