vedeu 0.6.71 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/docs/api.md +1 -1
  3. data/lib/vedeu/all.rb +1 -0
  4. data/lib/vedeu/borders/border.rb +66 -55
  5. data/lib/vedeu/borders/caption.rb +10 -20
  6. data/lib/vedeu/borders/dsl.rb +57 -13
  7. data/lib/vedeu/borders/refresh.rb +123 -64
  8. data/lib/vedeu/borders/set_attribute.rb +1 -3
  9. data/lib/vedeu/borders/title.rb +68 -25
  10. data/lib/vedeu/cells/all.rb +23 -0
  11. data/lib/vedeu/cells/border.rb +72 -0
  12. data/lib/vedeu/cells/borders/all.rb +18 -0
  13. data/lib/vedeu/cells/borders/bottom_horizontal.rb +28 -0
  14. data/lib/vedeu/cells/borders/bottom_left.rb +34 -0
  15. data/lib/vedeu/cells/borders/bottom_right.rb +34 -0
  16. data/lib/vedeu/cells/borders/horizontal.rb +28 -0
  17. data/lib/vedeu/cells/borders/left_vertical.rb +28 -0
  18. data/lib/vedeu/cells/borders/right_vertical.rb +28 -0
  19. data/lib/vedeu/cells/borders/top_horizontal.rb +28 -0
  20. data/lib/vedeu/cells/borders/top_left.rb +34 -0
  21. data/lib/vedeu/cells/borders/top_right.rb +34 -0
  22. data/lib/vedeu/cells/borders/vertical.rb +28 -0
  23. data/lib/vedeu/cells/char.rb +24 -0
  24. data/lib/vedeu/cells/clear.rb +29 -0
  25. data/lib/vedeu/cells/empty.rb +78 -0
  26. data/lib/vedeu/cells/escape.rb +24 -0
  27. data/lib/vedeu/cells/html.rb +19 -0
  28. data/lib/vedeu/cells/json.rb +19 -0
  29. data/lib/vedeu/colours/colour.rb +6 -6
  30. data/lib/vedeu/common.rb +9 -0
  31. data/lib/vedeu/cursors/move.rb +2 -3
  32. data/lib/vedeu/editor/insert.rb +1 -1
  33. data/lib/vedeu/editor/item.rb +2 -3
  34. data/lib/vedeu/input/mouse.rb +1 -1
  35. data/lib/vedeu/interfaces/clear.rb +3 -4
  36. data/lib/vedeu/output/compressor.rb +1 -0
  37. data/lib/vedeu/presentation/colour.rb +3 -0
  38. data/lib/vedeu/repositories/defaults.rb +10 -1
  39. data/lib/vedeu/templating/decoder.rb +1 -1
  40. data/lib/vedeu/templating/encoder.rb +1 -1
  41. data/lib/vedeu/templating/template.rb +2 -2
  42. data/lib/vedeu/templating/view_template.rb +1 -1
  43. data/lib/vedeu/terminal/terminal.rb +9 -0
  44. data/lib/vedeu/version.rb +1 -1
  45. data/lib/vedeu/views/html_char.rb +1 -1
  46. data/test/lib/vedeu/application/application_controller_test.rb +2 -2
  47. data/test/lib/vedeu/application/controller_test.rb +4 -4
  48. data/test/lib/vedeu/borders/border_test.rb +10 -2
  49. data/test/lib/vedeu/borders/caption_test.rb +29 -13
  50. data/test/lib/vedeu/borders/dsl_test.rb +44 -25
  51. data/test/lib/vedeu/borders/refresh_test.rb +2 -2
  52. data/test/lib/vedeu/borders/title_test.rb +17 -15
  53. data/test/lib/vedeu/buffers/buffer_test.rb +8 -8
  54. data/test/lib/vedeu/buffers/refresh_test.rb +10 -10
  55. data/test/lib/vedeu/buffers/terminal_test.rb +6 -6
  56. data/test/lib/vedeu/cells/border_test.rb +72 -0
  57. data/test/lib/vedeu/cells/borders/bottom_horizontal_test.rb +22 -0
  58. data/test/lib/vedeu/cells/borders/bottom_left_test.rb +36 -0
  59. data/test/lib/vedeu/cells/borders/bottom_right_test.rb +36 -0
  60. data/test/lib/vedeu/cells/borders/horizontal_test.rb +22 -0
  61. data/test/lib/vedeu/cells/borders/left_vertical_test.rb +22 -0
  62. data/test/lib/vedeu/cells/borders/right_vertical_test.rb +22 -0
  63. data/test/lib/vedeu/cells/borders/top_horizontal_test.rb +22 -0
  64. data/test/lib/vedeu/cells/borders/top_left_test.rb +36 -0
  65. data/test/lib/vedeu/cells/borders/top_right_test.rb +36 -0
  66. data/test/lib/vedeu/cells/borders/vertical_test.rb +22 -0
  67. data/test/lib/vedeu/cells/char_test.rb +22 -0
  68. data/test/lib/vedeu/cells/clear_test.rb +34 -0
  69. data/test/lib/vedeu/cells/empty_test.rb +55 -0
  70. data/test/lib/vedeu/cells/escape_test.rb +13 -0
  71. data/test/lib/vedeu/cells/html_test.rb +13 -0
  72. data/test/lib/vedeu/cells/json_test.rb +13 -0
  73. data/test/lib/vedeu/colours/colour_test.rb +2 -6
  74. data/test/lib/vedeu/colours/translator_test.rb +4 -4
  75. data/test/lib/vedeu/common_test.rb +10 -0
  76. data/test/lib/vedeu/configuration/api_test.rb +24 -24
  77. data/test/lib/vedeu/cursors/cursor_test.rb +4 -4
  78. data/test/lib/vedeu/cursors/dsl_test.rb +16 -16
  79. data/test/lib/vedeu/cursors/reposition_test.rb +2 -2
  80. data/test/lib/vedeu/cursors/repository_test.rb +2 -2
  81. data/test/lib/vedeu/distributed/client_test.rb +2 -2
  82. data/test/lib/vedeu/distributed/server_test.rb +8 -8
  83. data/test/lib/vedeu/distributed/subprocess_test.rb +2 -2
  84. data/test/lib/vedeu/distributed/test_application_test.rb +2 -2
  85. data/test/lib/vedeu/dsl/line_test.rb +2 -2
  86. data/test/lib/vedeu/dsl/presentation_test.rb +4 -4
  87. data/test/lib/vedeu/editor/cursor_test.rb +2 -2
  88. data/test/lib/vedeu/editor/document_test.rb +4 -4
  89. data/test/lib/vedeu/editor/editor_test.rb +20 -20
  90. data/test/lib/vedeu/events/aliases_test.rb +2 -2
  91. data/test/lib/vedeu/events/repository_test.rb +2 -2
  92. data/test/lib/vedeu/geometries/area/area_test.rb +2 -2
  93. data/test/lib/vedeu/geometries/geometry_test.rb +2 -2
  94. data/test/lib/vedeu/geometries/move_test.rb +2 -2
  95. data/test/lib/vedeu/geometries/position_test.rb +2 -2
  96. data/test/lib/vedeu/groups/clear_test.rb +2 -2
  97. data/test/lib/vedeu/groups/group_test.rb +4 -4
  98. data/test/lib/vedeu/groups/refresh_test.rb +2 -2
  99. data/test/lib/vedeu/input/capture_test.rb +42 -40
  100. data/test/lib/vedeu/input/mouse_test.rb +13 -11
  101. data/test/lib/vedeu/input/read_test.rb +10 -10
  102. data/test/lib/vedeu/interfaces/clear_test.rb +15 -6
  103. data/test/lib/vedeu/interfaces/dsl_test.rb +14 -14
  104. data/test/lib/vedeu/interfaces/interface_test.rb +12 -9
  105. data/test/lib/vedeu/logging/debug_test.rb +2 -2
  106. data/test/lib/vedeu/logging/lockless_log_device_test.rb +2 -2
  107. data/test/lib/vedeu/logging/log_test.rb +4 -4
  108. data/test/lib/vedeu/logging/mono_logger_test.rb +8 -8
  109. data/test/lib/vedeu/logging/timer_test.rb +2 -2
  110. data/test/lib/vedeu/menus/menu_test.rb +4 -4
  111. data/test/lib/vedeu/models/cell_test.rb +2 -2
  112. data/test/lib/vedeu/models/focus_test.rb +6 -6
  113. data/test/lib/vedeu/models/toggleable_test.rb +10 -10
  114. data/test/lib/vedeu/null/generic_test.rb +2 -2
  115. data/test/lib/vedeu/output/output_test.rb +8 -8
  116. data/test/lib/vedeu/output/refresh_test.rb +2 -2
  117. data/test/lib/vedeu/output/viewport_test.rb +2 -2
  118. data/test/lib/vedeu/plugins/plugin_test.rb +4 -4
  119. data/test/lib/vedeu/presentation/background_test.rb +2 -2
  120. data/test/lib/vedeu/presentation/foreground_test.rb +2 -2
  121. data/test/lib/vedeu/presentation/style_test.rb +2 -2
  122. data/test/lib/vedeu/renderers/all_test.rb +2 -2
  123. data/test/lib/vedeu/renderers/file_test.rb +6 -6
  124. data/test/lib/vedeu/renderers/terminal_test.rb +2 -2
  125. data/test/lib/vedeu/repositories/collection_test.rb +2 -2
  126. data/test/lib/vedeu/repositories/defaults_test.rb +35 -0
  127. data/test/lib/vedeu/repositories/registerable_test.rb +2 -2
  128. data/test/lib/vedeu/runtime/bootstrap_test.rb +2 -2
  129. data/test/lib/vedeu/runtime/flags_test.rb +2 -2
  130. data/test/lib/vedeu/runtime/launcher_test.rb +4 -4
  131. data/test/lib/vedeu/runtime/main_loop_test.rb +2 -2
  132. data/test/lib/vedeu/runtime/router_test.rb +12 -12
  133. data/test/lib/vedeu/terminal/mode_test.rb +4 -4
  134. data/test/lib/vedeu/terminal/terminal_test.rb +19 -9
  135. data/test/lib/vedeu/views/char_test.rb +2 -2
  136. data/test/lib/vedeu/views/composition_test.rb +2 -2
  137. data/test/lib/vedeu/views/line_test.rb +2 -2
  138. data/test/lib/vedeu/views/stream_test.rb +2 -2
  139. data/test/lib/vedeu/views/view_test.rb +4 -4
  140. data/vedeu.gemspec +1 -1
  141. metadata +57 -4
@@ -31,20 +31,20 @@ module Vedeu
31
31
  it { instance.must_be_instance_of(described) }
32
32
  it { instance.instance_variable_get('@members').must_equal(members) }
33
33
  it { instance.instance_variable_get('@name').must_equal(_name) }
34
- it {
34
+ it do
35
35
  instance.instance_variable_get('@repository').must_equal(repository)
36
- }
36
+ end
37
37
  it { instance.instance_variable_get('@visible').must_equal(visible) }
38
38
  end
39
39
 
40
40
  describe 'accessors' do
41
- it {
41
+ it do
42
42
  instance.must_respond_to(:name)
43
43
  instance.must_respond_to(:name=)
44
44
  instance.must_respond_to(:visible)
45
45
  instance.must_respond_to(:visible=)
46
46
  instance.must_respond_to(:visible?)
47
- }
47
+ end
48
48
  end
49
49
 
50
50
  describe '#add' do
@@ -51,10 +51,10 @@ module Vedeu
51
51
  # @todo Add more tests.
52
52
  # it { skip }
53
53
 
54
- # it {
54
+ # it do
55
55
  # Vedeu.expects(:trigger).with(:_refresh_view_)
56
56
  # subject
57
- # }
57
+ # end
58
58
  end
59
59
  end
60
60
 
@@ -62,32 +62,34 @@ module Vedeu
62
62
  context 'when the key is registered with a keymap' do
63
63
  let(:registered) { true }
64
64
 
65
- it {
66
- Vedeu::Input::Mapper.expects(:registered?).with(translated, _name)
65
+ it do
66
+ Vedeu::Input::Mapper.
67
+ expects(:registered?).with(translated, _name)
67
68
  subject
68
- }
69
+ end
69
70
 
70
- it {
71
- Vedeu.expects(:trigger).with(:_keypress_, translated, 'Vedeu::Input::Capture')
71
+ it do
72
+ Vedeu.expects(:trigger).
73
+ with(:_keypress_, translated, 'Vedeu::Input::Capture')
72
74
  subject
73
- }
75
+ end
74
76
  end
75
77
 
76
78
  context 'when the key is not registered with a keymap' do
77
79
  context 'when the interface is editable' do
78
80
  let(:editable) { true }
79
81
 
80
- it {
82
+ it do
81
83
  Vedeu.expects(:trigger).with(:_editor_, :shift_f5)
82
84
  subject
83
- }
85
+ end
84
86
  end
85
87
 
86
88
  context 'when the interface is not editable' do
87
- it {
89
+ it do
88
90
  Vedeu.expects(:trigger).with(:key, :shift_f5)
89
91
  subject
90
- }
92
+ end
91
93
  end
92
94
  end
93
95
  end
@@ -96,51 +98,51 @@ module Vedeu
96
98
  let(:keypress) { "\e[M`6E" }
97
99
  let(:translated) {}
98
100
 
99
- it {
101
+ it do
100
102
  Vedeu.expects(:trigger).with(:_cursor_up_, _name)
101
103
  Vedeu.expects(:trigger).with(:_mouse_event_, "\e[M`6E")
102
104
  subject
103
- }
105
+ end
104
106
  end
105
107
 
106
108
  context 'when the key is :f6 key (read_nonblock(5))' do
107
109
  let(:keypress) { "\e[17~" }
108
110
  let(:translated) { :f6 }
109
111
 
110
- it {
112
+ it do
111
113
  Vedeu.expects(:trigger).with(:key, translated)
112
114
  subject
113
- }
115
+ end
114
116
  end
115
117
 
116
118
  context 'when the key is :delete (read_nonblock(4))' do
117
119
  let(:keypress) { "\e[3~" }
118
120
  let(:translated) { :delete }
119
121
 
120
- it {
122
+ it do
121
123
  Vedeu.expects(:trigger).with(:key, translated)
122
124
  subject
123
- }
125
+ end
124
126
  end
125
127
 
126
128
  context 'when the key is :up (read_nonblock(3))' do
127
129
  let(:keypress) { "\e[A" }
128
130
  let(:translated) { :up }
129
131
 
130
- it {
132
+ it do
131
133
  Vedeu.expects(:trigger).with(:key, translated)
132
134
  subject
133
- }
135
+ end
134
136
  end
135
137
 
136
138
  context 'when the key is :escape (read_nonblock(1))' do
137
139
  let(:keypress) { "\e" }
138
140
  let(:translated) { :escape }
139
141
 
140
- it {
142
+ it do
141
143
  Vedeu.expects(:trigger).with(:key, translated)
142
144
  subject
143
- }
145
+ end
144
146
  end
145
147
  end
146
148
 
@@ -148,10 +150,10 @@ module Vedeu
148
150
  let(:keypress) { 'r' }
149
151
  let(:translated) { 'r' }
150
152
 
151
- it {
153
+ it do
152
154
  Vedeu.expects(:trigger).with(:key, keypress)
153
155
  subject
154
- }
156
+ end
155
157
  end
156
158
  end
157
159
 
@@ -164,67 +166,67 @@ module Vedeu
164
166
  context 'when the key is :shift_f5 (read_nonblock(7))' do
165
167
  let(:keypress) { "\e[15;2~" }
166
168
 
167
- it {
169
+ it do
168
170
  Vedeu.expects(:trigger).with(:_keypress_, :shift_f5)
169
171
  subject
170
- }
172
+ end
171
173
  end
172
174
 
173
175
  context 'when the key is really a mouse click (read_nonblock(6))' do
174
176
  let(:keypress) { "\e[M`6E" }
175
177
 
176
- it {
178
+ it do
177
179
  Vedeu.expects(:trigger).with(:_cursor_up_, _name)
178
180
  Vedeu.expects(:trigger).with(:_mouse_event_, "\e[M`6E")
179
181
  Vedeu.expects(:trigger).with(:_keypress_, nil)
180
182
  subject
181
- }
183
+ end
182
184
  end
183
185
 
184
186
  context 'when the key is :f6 key (read_nonblock(5))' do
185
187
  let(:keypress) { "\e[17~" }
186
188
 
187
- it {
189
+ it do
188
190
  Vedeu.expects(:trigger).with(:_keypress_, :f6)
189
191
  subject
190
- }
192
+ end
191
193
  end
192
194
 
193
195
  context 'when the key is :delete (read_nonblock(4))' do
194
196
  let(:keypress) { "\e[3~" }
195
197
 
196
- it {
198
+ it do
197
199
  Vedeu.expects(:trigger).with(:_keypress_, :delete)
198
200
  subject
199
- }
201
+ end
200
202
  end
201
203
 
202
204
  context 'when the key is :up (read_nonblock(3))' do
203
205
  let(:keypress) { "\e[A" }
204
206
 
205
- it {
207
+ it do
206
208
  Vedeu.expects(:trigger).with(:_keypress_, :up)
207
209
  subject
208
- }
210
+ end
209
211
  end
210
212
 
211
213
  context 'when the key is :escape (read_nonblock(1))' do
212
214
  let(:keypress) { "\e" }
213
215
 
214
- it {
216
+ it do
215
217
  Vedeu.expects(:trigger).with(:_keypress_, :escape)
216
218
  subject
217
- }
219
+ end
218
220
  end
219
221
  end
220
222
 
221
223
  context 'when the keypress is not an escape sequence' do
222
224
  let(:keypress) { 'r' }
223
225
 
224
- it {
226
+ it do
225
227
  Vedeu.expects(:trigger).with(:_keypress_, keypress)
226
228
  subject
227
- }
229
+ end
228
230
  end
229
231
  end
230
232
 
@@ -239,17 +241,17 @@ module Vedeu
239
241
  context 'when the input is a mouse click' do
240
242
  let(:command) { "\e[M`6E" }
241
243
 
242
- it {
244
+ it do
243
245
  Vedeu.expects(:trigger).with(:_command_, command)
244
246
  subject
245
- }
247
+ end
246
248
  end
247
249
 
248
250
  context 'when the input is not a mouse click' do
249
- it {
251
+ it do
250
252
  Vedeu.expects(:trigger).with(:_command_, 'help')
251
253
  subject
252
- }
254
+ end
253
255
  end
254
256
  end
255
257
  end
@@ -24,41 +24,43 @@ module Vedeu
24
24
  context 'when the left mouse button was pressed' do
25
25
  let(:input) { "\e[M ,%" }
26
26
 
27
- it {
27
+ it do
28
28
  Vedeu.expects(:trigger).with(:_mouse_event_, input)
29
- Vedeu.expects(:trigger).with(:_cursor_reposition_, Vedeu.focus, 5, 12)
29
+ Vedeu.expects(:trigger).
30
+ with(:_cursor_reposition_, Vedeu.focus, 5, 12)
30
31
  subject
31
- }
32
+ end
32
33
  end
33
34
 
34
35
  context 'when the mouse scroll wheel was moved upwards' do
35
36
  let(:input) { "\e[M`6E" }
36
37
 
37
- it {
38
+ it do
38
39
  Vedeu.expects(:trigger).with(:_mouse_event_, input)
39
40
  Vedeu.expects(:trigger).with(:_cursor_up_, Vedeu.focus)
40
41
  subject
41
- }
42
+ end
42
43
  end
43
44
 
44
45
  context 'when the mouse scroll wheel was moved downwards' do
45
46
  let(:input) { "\e[MaN5" }
46
47
 
47
- it {
48
+ it do
48
49
  Vedeu.expects(:trigger).with(:_mouse_event_, input)
49
50
  Vedeu.expects(:trigger).with(:_cursor_down_, Vedeu.focus)
50
51
  subject
51
- }
52
+ end
52
53
  end
53
54
 
54
55
  context 'when the mouse input was not recognised' do
55
56
  let(:input) { "\e[Mb0(" }
56
57
 
57
- it {
58
+ it do
58
59
  Vedeu.expects(:trigger).with(:_mouse_event_, input)
59
- subject.must_equal("\e[93m[input] \e[39m\e[33mVedeu does not " \
60
- "support mouse button '66' yet.\e[39m")
61
- }
60
+ subject.
61
+ must_equal("\e[93m[input] \e[39m\e[33mVedeu does not " \
62
+ "support mouse button '66' yet.\e[39m")
63
+ end
62
64
  end
63
65
  end
64
66
 
@@ -29,21 +29,21 @@ module Vedeu
29
29
  context 'when input was given' do
30
30
  let(:input) { 'Some text...' }
31
31
 
32
- it {
32
+ it do
33
33
  Vedeu.expects(:trigger).with(:_command_, input)
34
34
  subject.must_equal(input)
35
- }
35
+ end
36
36
  end
37
37
 
38
38
  context 'when input was not given' do
39
39
  let(:some_input) { "Some text...\n" }
40
40
  let(:chomped) { 'Some text...' }
41
41
 
42
- it {
42
+ it do
43
43
  Vedeu::Terminal.console.expects(:gets).returns(some_input)
44
44
  Vedeu.expects(:trigger).with(:_command_, chomped)
45
45
  subject.must_equal(chomped)
46
- }
46
+ end
47
47
  end
48
48
  end
49
49
 
@@ -53,33 +53,33 @@ module Vedeu
53
53
  context 'when input was given' do
54
54
  let(:input) { 'S' }
55
55
 
56
- it {
56
+ it do
57
57
  Vedeu.expects(:trigger).with(:_keypress_, input)
58
58
  subject.must_equal(input)
59
- }
59
+ end
60
60
  end
61
61
 
62
62
  context 'when input was not given' do
63
63
  let(:some_input) { 'T' }
64
64
  let(:translated) { 'T' }
65
65
 
66
- it {
66
+ it do
67
67
  Vedeu::Terminal.console.expects(:getch).returns(some_input)
68
68
  Vedeu::Input::Translator.expects(:translate).returns(translated)
69
69
  Vedeu.expects(:trigger).with(:_keypress_, translated)
70
70
  subject.must_equal(translated)
71
- }
71
+ end
72
72
 
73
73
  context 'but a special key is pressed' do
74
74
  let(:some_input) { "\e[23;2~" }
75
75
  let(:translated) { :shift_f11 }
76
76
 
77
- it {
77
+ it do
78
78
  Vedeu::Terminal.console.expects(:getch).returns(some_input)
79
79
  Vedeu::Input::Translator.expects(:translate).returns(translated)
80
80
  Vedeu.expects(:trigger).with(:_keypress_, translated)
81
81
  subject.must_equal(translated)
82
- }
82
+ end
83
83
  end
84
84
  end
85
85
  end
@@ -37,6 +37,7 @@ module Vedeu
37
37
  let(:interface) {
38
38
  Vedeu::Interfaces::Interface.new(name: _name, visible: visible)
39
39
  }
40
+ let(:colour) { interface.colour }
40
41
  let(:visible) { true }
41
42
  let(:geometry) {
42
43
  Vedeu::Geometries::Geometry.new(name: _name, x: 1, y: 1, xn: 2, yn: 2)
@@ -44,11 +45,19 @@ module Vedeu
44
45
  let(:output) {
45
46
  [
46
47
  [
47
- Vedeu::Views::Char.new(name: _name, value: ' ', position: [1, 1]),
48
- Vedeu::Views::Char.new(name: _name, value: ' ', position: [1, 2]),
48
+ Vedeu::Cells::Clear.new(colour: colour,
49
+ name: _name,
50
+ position: [1, 1]),
51
+ Vedeu::Cells::Clear.new(colour: colour,
52
+ name: _name,
53
+ position: [1, 2]),
49
54
  ], [
50
- Vedeu::Views::Char.new(name: _name, value: ' ', position: [2, 1]),
51
- Vedeu::Views::Char.new(name: _name, value: ' ', position: [2, 2]),
55
+ Vedeu::Cells::Clear.new(colour: colour,
56
+ name: _name,
57
+ position: [2, 1]),
58
+ Vedeu::Cells::Clear.new(colour: colour,
59
+ name: _name,
60
+ position: [2, 2]),
52
61
  ]
53
62
  ]
54
63
  }
@@ -62,10 +71,10 @@ module Vedeu
62
71
  subject { instance.render }
63
72
 
64
73
  it { subject.must_be_instance_of(Array) }
65
- it {
74
+ it do
66
75
  Vedeu.expects(:render_output).with(output)
67
76
  subject
68
- }
77
+ end
69
78
  it { subject.must_equal(output) }
70
79
  end
71
80
 
@@ -45,10 +45,10 @@ module Vedeu
45
45
  describe '#delay' do
46
46
  subject { instance.delay(0.25) }
47
47
 
48
- it {
48
+ it do
49
49
  subject
50
50
  model.delay.must_equal(0.25)
51
- }
51
+ end
52
52
  end
53
53
 
54
54
  describe '#editable' do
@@ -118,26 +118,26 @@ module Vedeu
118
118
  members: ['lanthanum']).store
119
119
  end
120
120
 
121
- it {
121
+ it do
122
122
  subject
123
123
  Vedeu.groups.find('elements').members.must_equal(members)
124
- }
124
+ end
125
125
  end
126
126
 
127
127
  context 'when the named group does not exist' do
128
- it {
128
+ it do
129
129
  subject
130
130
  Vedeu.groups.find('elements').members.must_equal(Set['actinium'])
131
- }
131
+ end
132
132
  end
133
133
  end
134
134
 
135
135
  describe '#keymap' do
136
- subject {
136
+ subject do
137
137
  instance.keys do
138
138
  # ...
139
139
  end
140
- }
140
+ end
141
141
 
142
142
  it { subject.must_be_instance_of(Vedeu::Input::Keymap) }
143
143
  it { instance.must_respond_to(:keys) }
@@ -146,28 +146,28 @@ module Vedeu
146
146
  describe '#name' do
147
147
  subject { instance.name('nickel') }
148
148
 
149
- it {
149
+ it do
150
150
  subject
151
151
  model.name.must_equal('nickel')
152
- }
152
+ end
153
153
  end
154
154
 
155
155
  describe '#show!' do
156
- subject {
156
+ subject do
157
157
  Vedeu.interface 'xenon' do
158
158
  show!
159
159
  end
160
- }
160
+ end
161
161
 
162
162
  it { subject.visible.must_equal(true) }
163
163
  end
164
164
 
165
165
  describe '#hide!' do
166
- subject {
166
+ subject do
167
167
  Vedeu.interface 'xenon' do
168
168
  hide!
169
169
  end
170
- }
170
+ end
171
171
 
172
172
  it { subject.visible.must_equal(false) }
173
173
  end