vedeu 0.6.8 → 0.6.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +9 -0
  3. data/README.md +1 -1
  4. data/docs/api.md +60 -67
  5. data/docs/configuration.md +8 -5
  6. data/docs/events.md +31 -15
  7. data/docs/events/application.md +12 -0
  8. data/docs/events/document.md +57 -0
  9. data/docs/events/drb.md +43 -0
  10. data/docs/events/focus.md +24 -0
  11. data/docs/events/menu.md +57 -0
  12. data/docs/events/movement.md +57 -0
  13. data/docs/events/refresh.md +25 -0
  14. data/docs/events/system.md +90 -0
  15. data/docs/events/visibility.md +68 -0
  16. data/lib/vedeu.rb +2 -2
  17. data/lib/vedeu/all.rb +3 -2
  18. data/lib/vedeu/api.rb +18 -18
  19. data/lib/vedeu/application/controller.rb +1 -1
  20. data/lib/vedeu/application/helper.rb +1 -1
  21. data/lib/vedeu/application/view.rb +1 -1
  22. data/lib/vedeu/bindings/application.rb +1 -12
  23. data/lib/vedeu/bindings/bindings.rb +3 -1
  24. data/lib/vedeu/bindings/document.rb +9 -62
  25. data/lib/vedeu/bindings/drb.rb +12 -56
  26. data/lib/vedeu/bindings/focus.rb +3 -28
  27. data/lib/vedeu/bindings/menus.rb +10 -66
  28. data/lib/vedeu/bindings/movement.rb +4 -69
  29. data/lib/vedeu/bindings/refresh.rb +3 -33
  30. data/lib/vedeu/bindings/system.rb +14 -100
  31. data/lib/vedeu/bindings/visibility.rb +20 -71
  32. data/lib/vedeu/borders/all.rb +4 -3
  33. data/lib/vedeu/borders/border.rb +39 -33
  34. data/lib/vedeu/borders/dsl.rb +40 -33
  35. data/lib/vedeu/borders/null.rb +2 -2
  36. data/lib/vedeu/borders/render.rb +29 -24
  37. data/lib/vedeu/borders/repository.rb +2 -2
  38. data/lib/vedeu/buffers/all.rb +8 -7
  39. data/lib/vedeu/buffers/buffer.rb +47 -39
  40. data/lib/vedeu/buffers/null.rb +2 -2
  41. data/lib/vedeu/buffers/refresh.rb +4 -3
  42. data/lib/vedeu/buffers/virtual_buffer.rb +122 -118
  43. data/lib/vedeu/buffers/virtual_buffers.rb +62 -56
  44. data/lib/vedeu/colours/background.rb +2 -1
  45. data/lib/vedeu/colours/colour.rb +21 -19
  46. data/lib/vedeu/colours/foreground.rb +2 -1
  47. data/lib/vedeu/colours/repository.rb +6 -5
  48. data/lib/vedeu/colours/translator.rb +39 -35
  49. data/lib/vedeu/configuration/api.rb +59 -51
  50. data/lib/vedeu/configuration/cli.rb +9 -7
  51. data/lib/vedeu/configuration/configuration.rb +41 -32
  52. data/lib/vedeu/cursors/cursor.rb +1 -1
  53. data/lib/vedeu/cursors/refresh.rb +20 -16
  54. data/lib/vedeu/distributed/server.rb +8 -6
  55. data/lib/vedeu/distributed/subprocess.rb +90 -86
  56. data/lib/vedeu/distributed/uri.rb +4 -3
  57. data/lib/vedeu/dsl/composition.rb +2 -2
  58. data/lib/vedeu/dsl/group.rb +4 -4
  59. data/lib/vedeu/dsl/interface.rb +5 -5
  60. data/lib/vedeu/dsl/presentation.rb +2 -2
  61. data/lib/vedeu/dsl/text.rb +1 -1
  62. data/lib/vedeu/editor/cropper.rb +4 -4
  63. data/lib/vedeu/editor/cursor.rb +6 -4
  64. data/lib/vedeu/editor/document.rb +20 -18
  65. data/lib/vedeu/editor/editor.rb +2 -2
  66. data/lib/vedeu/editor/line.rb +10 -5
  67. data/lib/vedeu/editor/lines.rb +2 -2
  68. data/lib/vedeu/internal_api.rb +4 -4
  69. data/lib/vedeu/models/focus.rb +197 -191
  70. data/lib/vedeu/models/group.rb +171 -159
  71. data/lib/vedeu/models/groups.rb +14 -10
  72. data/lib/vedeu/models/interface.rb +116 -110
  73. data/lib/vedeu/models/interfaces.rb +24 -20
  74. data/lib/vedeu/models/toggleable.rb +4 -4
  75. data/lib/vedeu/models/views/char.rb +1 -1
  76. data/lib/vedeu/models/views/composition.rb +1 -1
  77. data/lib/vedeu/models/views/line.rb +1 -1
  78. data/lib/vedeu/models/views/stream.rb +1 -1
  79. data/lib/vedeu/models/views/view.rb +1 -1
  80. data/lib/vedeu/null/interface.rb +1 -1
  81. data/lib/vedeu/null/view.rb +1 -1
  82. data/lib/vedeu/output/clear/named_interface.rb +1 -1
  83. data/lib/vedeu/output/compressor.rb +78 -73
  84. data/lib/vedeu/output/direct.rb +61 -57
  85. data/lib/vedeu/output/output.rb +34 -29
  86. data/lib/vedeu/output/{presentation.rb → presentation/presentation.rb} +2 -1
  87. data/lib/vedeu/output/presentation/style.rb +64 -18
  88. data/lib/vedeu/output/presentation/styles.rb +39 -0
  89. data/lib/vedeu/output/renderers/html.rb +2 -2
  90. data/lib/vedeu/output/renderers/json.rb +2 -1
  91. data/lib/vedeu/output/renderers/terminal.rb +3 -3
  92. data/lib/vedeu/output/renderers/text.rb +3 -3
  93. data/lib/vedeu/output/text.rb +186 -180
  94. data/lib/vedeu/output/wordwrap.rb +142 -138
  95. data/lib/vedeu/refresh/refresh.rb +2 -2
  96. data/lib/vedeu/templating/helpers.rb +11 -6
  97. data/lib/vedeu/templating/view_template.rb +1 -1
  98. data/lib/vedeu/terminal/terminal.rb +2 -2
  99. data/lib/vedeu/version.rb +1 -1
  100. data/test/lib/vedeu/borders/render_test.rb +1 -1
  101. data/test/lib/vedeu/buffers/buffer_test.rb +16 -14
  102. data/test/lib/vedeu/buffers/virtual_buffer_test.rb +105 -101
  103. data/test/lib/vedeu/buffers/virtual_buffers_test.rb +43 -39
  104. data/test/lib/vedeu/colours/colour_test.rb +4 -4
  105. data/test/lib/vedeu/cursors/cursor_test.rb +2 -2
  106. data/test/lib/vedeu/cursors/repository_test.rb +3 -3
  107. data/test/lib/vedeu/distributed/subprocess_test.rb +33 -29
  108. data/test/lib/vedeu/dsl/group_test.rb +3 -3
  109. data/test/lib/vedeu/dsl/interface_test.rb +6 -5
  110. data/test/lib/vedeu/dsl/line_test.rb +4 -2
  111. data/test/lib/vedeu/dsl/presentation_test.rb +2 -2
  112. data/test/lib/vedeu/dsl/text_test.rb +8 -8
  113. data/test/lib/vedeu/editor/document_test.rb +10 -6
  114. data/test/lib/vedeu/input/keymap_test.rb +1 -10
  115. data/test/lib/vedeu/models/focus_test.rb +177 -170
  116. data/test/lib/vedeu/models/group_test.rb +99 -95
  117. data/test/lib/vedeu/models/groups_test.rb +13 -9
  118. data/test/lib/vedeu/models/interface_test.rb +93 -87
  119. data/test/lib/vedeu/models/interfaces_test.rb +24 -20
  120. data/test/lib/vedeu/models/views/char_test.rb +2 -2
  121. data/test/lib/vedeu/models/views/line_test.rb +11 -7
  122. data/test/lib/vedeu/models/views/stream_test.rb +1 -1
  123. data/test/lib/vedeu/models/views/view_test.rb +1 -1
  124. data/test/lib/vedeu/output/clear/named_group_test.rb +1 -1
  125. data/test/lib/vedeu/output/clear/named_interface_test.rb +3 -1
  126. data/test/lib/vedeu/output/compressor_test.rb +126 -122
  127. data/test/lib/vedeu/output/direct_test.rb +49 -43
  128. data/test/lib/vedeu/output/output_test.rb +35 -31
  129. data/test/lib/vedeu/output/{presentation_test.rb → presentation/presentation_test.rb} +11 -7
  130. data/test/lib/vedeu/output/presentation/style_test.rb +88 -48
  131. data/test/lib/vedeu/output/presentation/styles_test.rb +84 -0
  132. data/test/lib/vedeu/output/text_test.rb +109 -105
  133. data/test/lib/vedeu/output/viewport_test.rb +3 -1
  134. data/test/lib/vedeu/output/wordwrap_test.rb +209 -205
  135. data/test/lib/vedeu/refresh/refresh_test.rb +3 -1
  136. data/test/lib/vedeu/templating/helpers_test.rb +6 -6
  137. data/test/lib/vedeu/templating/view_template_test.rb +1 -1
  138. metadata +17 -8
  139. data/lib/vedeu/output/style.rb +0 -76
  140. data/test/lib/vedeu/output/style_test.rb +0 -120
@@ -2,143 +2,147 @@ require 'test_helper'
2
2
 
3
3
  module Vedeu
4
4
 
5
- describe VirtualBuffer do
6
-
7
- let(:described) { Vedeu::VirtualBuffer }
8
- let(:instance) { described.new(height, width, renderer) }
9
- let(:height) { 3 }
10
- let(:width) { 3 }
11
- let(:renderer) { Vedeu::Renderers::HTML.new }
12
-
13
- describe '#initialize' do
14
- it { instance.must_be_instance_of(described) }
15
- it { instance.instance_variable_get('@height').must_equal(3) }
16
- it { instance.instance_variable_get('@width').must_equal(3) }
17
- it { instance.instance_variable_get('@renderer').must_equal(renderer) }
18
- end
19
-
20
- describe 'accessors' do
21
- it { instance.must_respond_to(:renderer) }
22
- it { instance.must_respond_to(:renderer=) }
23
- it { instance.must_respond_to(:height) }
24
- it { instance.must_respond_to(:width) }
25
- end
26
-
27
- describe '.output' do
28
- let(:data) {}
29
-
30
- before do
31
- Vedeu.stubs(:width).returns(3)
32
- Vedeu.stubs(:height).returns(3)
33
- end
5
+ module Buffers
34
6
 
35
- subject { described.output(data) }
7
+ describe VirtualBuffer do
36
8
 
37
- it { subject.must_be_instance_of(Array) }
38
- end
9
+ let(:described) { Vedeu::Buffers::VirtualBuffer }
10
+ let(:instance) { described.new(height, width, renderer) }
11
+ let(:height) { 3 }
12
+ let(:width) { 3 }
13
+ let(:renderer) { Vedeu::Renderers::HTML.new }
39
14
 
40
- describe '#cells' do
41
- before do
42
- Vedeu.stubs(:width).returns(3)
43
- Vedeu.stubs(:height).returns(3)
15
+ describe '#initialize' do
16
+ it { instance.must_be_instance_of(described) }
17
+ it { instance.instance_variable_get('@height').must_equal(3) }
18
+ it { instance.instance_variable_get('@width').must_equal(3) }
19
+ it { instance.instance_variable_get('@renderer').must_equal(renderer) }
44
20
  end
45
21
 
46
- subject { instance.cells }
22
+ describe 'accessors' do
23
+ it { instance.must_respond_to(:renderer) }
24
+ it { instance.must_respond_to(:renderer=) }
25
+ it { instance.must_respond_to(:height) }
26
+ it { instance.must_respond_to(:width) }
27
+ end
47
28
 
48
- it { subject.must_be_instance_of(Array) }
49
- it { subject.size.must_equal(3) }
50
- it { subject.flatten.size.must_equal(9) }
51
- end
29
+ describe '.output' do
30
+ let(:data) {}
52
31
 
53
- describe '#read' do
54
- subject { instance.read(y, x) }
32
+ before do
33
+ Vedeu.stubs(:width).returns(3)
34
+ Vedeu.stubs(:height).returns(3)
35
+ end
55
36
 
56
- context 'when x is out of bounds' do
57
- let(:y) { 1 }
58
- let(:x) { 5 }
37
+ subject { described.output(data) }
59
38
 
60
- it { subject.must_equal([]) }
39
+ it { subject.must_be_instance_of(Array) }
61
40
  end
62
41
 
63
- context 'when y is out of bounds' do
64
- let(:y) { 5 }
65
- let(:x) { 1 }
42
+ describe '#cells' do
43
+ before do
44
+ Vedeu.stubs(:width).returns(3)
45
+ Vedeu.stubs(:height).returns(3)
46
+ end
66
47
 
67
- it { subject.must_equal([]) }
68
- end
48
+ subject { instance.cells }
69
49
 
70
- context 'when both x and y are out of bounds' do
71
- let(:y) { 5 }
72
- let(:x) { 5 }
73
-
74
- it { subject.must_equal([]) }
50
+ it { subject.must_be_instance_of(Array) }
51
+ it { subject.size.must_equal(3) }
52
+ it { subject.flatten.size.must_equal(9) }
75
53
  end
76
54
 
77
- context 'when x and y are in bounds' do
78
- let(:y) { 0 }
79
- let(:x) { 2 }
55
+ describe '#read' do
56
+ subject { instance.read(y, x) }
80
57
 
81
- it { subject.must_be_instance_of(Vedeu::Models::Cell) }
82
- end
83
- end
58
+ context 'when x is out of bounds' do
59
+ let(:y) { 1 }
60
+ let(:x) { 5 }
84
61
 
85
- describe '#output' do
86
- it { instance.must_respond_to(:output) }
87
- end
62
+ it { subject.must_equal([]) }
63
+ end
88
64
 
89
- describe '#render' do
90
- before do
91
- Vedeu.stubs(:width).returns(3)
92
- Vedeu.stubs(:height).returns(3)
93
- end
65
+ context 'when y is out of bounds' do
66
+ let(:y) { 5 }
67
+ let(:x) { 1 }
94
68
 
95
- subject { instance.render }
69
+ it { subject.must_equal([]) }
70
+ end
96
71
 
97
- it { subject.must_be_instance_of(String) }
98
- end
72
+ context 'when both x and y are out of bounds' do
73
+ let(:y) { 5 }
74
+ let(:x) { 5 }
99
75
 
100
- describe '#reset' do
101
- subject { instance.reset }
76
+ it { subject.must_equal([]) }
77
+ end
102
78
 
103
- it { subject.must_be_instance_of(Array) }
79
+ context 'when x and y are in bounds' do
80
+ let(:y) { 0 }
81
+ let(:x) { 2 }
104
82
 
105
- it { instance.must_respond_to(:clear) }
106
- end
83
+ it { subject.must_be_instance_of(Vedeu::Models::Cell) }
84
+ end
85
+ end
107
86
 
108
- describe '#write' do
109
- let(:data) { Vedeu::Views::Char.new(value: 'a') }
87
+ describe '#output' do
88
+ it { instance.must_respond_to(:output) }
89
+ end
110
90
 
111
- subject { instance.write(y, x, data) }
91
+ describe '#render' do
92
+ before do
93
+ Vedeu.stubs(:width).returns(3)
94
+ Vedeu.stubs(:height).returns(3)
95
+ end
112
96
 
113
- context 'when x is out of bounds' do
114
- let(:y) { 1 }
115
- let(:x) { 5 }
97
+ subject { instance.render }
116
98
 
117
- it { subject.must_equal(false) }
99
+ it { subject.must_be_instance_of(String) }
118
100
  end
119
101
 
120
- context 'when y is out of bounds' do
121
- let(:y) { 5 }
122
- let(:x) { 1 }
102
+ describe '#reset' do
103
+ subject { instance.reset }
104
+
105
+ it { subject.must_be_instance_of(Array) }
123
106
 
124
- it { subject.must_equal(false) }
107
+ it { instance.must_respond_to(:clear) }
125
108
  end
126
109
 
127
- context 'when both x and y are out of bounds' do
128
- let(:y) { 5 }
129
- let(:x) { 5 }
110
+ describe '#write' do
111
+ let(:data) { Vedeu::Views::Char.new(value: 'a') }
130
112
 
131
- it { subject.must_equal(false) }
132
- end
113
+ subject { instance.write(y, x, data) }
114
+
115
+ context 'when x is out of bounds' do
116
+ let(:y) { 1 }
117
+ let(:x) { 5 }
118
+
119
+ it { subject.must_equal(false) }
120
+ end
121
+
122
+ context 'when y is out of bounds' do
123
+ let(:y) { 5 }
124
+ let(:x) { 1 }
133
125
 
134
- context 'when x and y are in bounds' do
135
- let(:y) { 0 }
136
- let(:x) { 2 }
126
+ it { subject.must_equal(false) }
127
+ end
137
128
 
138
- it { subject.must_equal(true) }
129
+ context 'when both x and y are out of bounds' do
130
+ let(:y) { 5 }
131
+ let(:x) { 5 }
132
+
133
+ it { subject.must_equal(false) }
134
+ end
135
+
136
+ context 'when x and y are in bounds' do
137
+ let(:y) { 0 }
138
+ let(:x) { 2 }
139
+
140
+ it { subject.must_equal(true) }
141
+ end
139
142
  end
140
- end
141
143
 
142
- end # VirtualBuffer
144
+ end # VirtualBuffer
145
+
146
+ end # Buffers
143
147
 
144
148
  end # Vedeu
@@ -2,68 +2,72 @@ require 'test_helper'
2
2
 
3
3
  module Vedeu
4
4
 
5
- describe VirtualBuffers do
5
+ module Buffers
6
6
 
7
- let(:described) { Vedeu::VirtualBuffers }
7
+ describe VirtualBuffers do
8
8
 
9
- before { described.clear }
9
+ let(:described) { Vedeu::Buffers::VirtualBuffers }
10
10
 
11
- describe '#retrieve' do
12
- subject { described.retrieve }
11
+ before { described.clear }
13
12
 
14
- context 'when no buffers are stored' do
15
- it { subject.must_be_instance_of(NilClass) }
16
- end
13
+ describe '#retrieve' do
14
+ subject { described.retrieve }
17
15
 
18
- context 'when buffers are stored' do
19
- let(:buffer) { [[Vedeu::Views::Char.new]] }
16
+ context 'when no buffers are stored' do
17
+ it { subject.must_be_instance_of(NilClass) }
18
+ end
20
19
 
21
- before { described.store(buffer) }
20
+ context 'when buffers are stored' do
21
+ let(:buffer) { [[Vedeu::Views::Char.new]] }
22
22
 
23
- it { subject.must_be_instance_of(Array) }
23
+ before { described.store(buffer) }
24
24
 
25
- it { subject.must_equal(buffer) }
25
+ it { subject.must_be_instance_of(Array) }
26
26
 
27
- it 'removes the stored buffer from the storage' do
28
- described.size.must_equal(1)
29
- subject
30
- described.size.must_equal(0)
27
+ it { subject.must_equal(buffer) }
28
+
29
+ it 'removes the stored buffer from the storage' do
30
+ described.size.must_equal(1)
31
+ subject
32
+ described.size.must_equal(0)
33
+ end
31
34
  end
32
35
  end
33
- end
34
36
 
35
- describe '#store' do
36
- let(:data) { :data }
37
+ describe '#store' do
38
+ let(:data) { :data }
37
39
 
38
- subject { described.store(data) }
40
+ subject { described.store(data) }
39
41
 
40
- it { subject.must_be_instance_of(Array) }
42
+ it { subject.must_be_instance_of(Array) }
41
43
 
42
- it { subject.must_equal([:data]) }
44
+ it { subject.must_equal([:data]) }
43
45
 
44
- it 'adds the buffer (data) to the storage' do
45
- described.size.must_equal(0)
46
- subject
47
- described.size.must_equal(1)
46
+ it 'adds the buffer (data) to the storage' do
47
+ described.size.must_equal(0)
48
+ subject
49
+ described.size.must_equal(1)
50
+ end
48
51
  end
49
- end
50
52
 
51
- describe '#size' do
52
- subject { described.size }
53
+ describe '#size' do
54
+ subject { described.size }
53
55
 
54
- it { subject.must_be_instance_of(Fixnum) }
55
- end
56
+ it { subject.must_be_instance_of(Fixnum) }
57
+ end
58
+
59
+ describe '#clear' do
60
+ subject { described.clear }
56
61
 
57
- describe '#clear' do
58
- subject { described.clear }
62
+ it { subject.must_be_instance_of(Array) }
59
63
 
60
- it { subject.must_be_instance_of(Array) }
64
+ it { subject.must_be_empty }
61
65
 
62
- it { subject.must_be_empty }
66
+ it { described.must_respond_to(:reset) }
67
+ end
63
68
 
64
- it { described.must_respond_to(:reset) }
65
- end
69
+ end # VirtualBuffers
66
70
 
67
- end # VirtualBuffers
71
+ end # Buffers
68
72
 
69
73
  end # Vedeu
@@ -170,9 +170,9 @@ module Vedeu
170
170
  describe '#background=' do
171
171
  let(:_value) { '#000000' }
172
172
 
173
- subject { instance.background = (_value) }
173
+ subject { instance.public_send(:background=, _value) }
174
174
 
175
- it { subject.must_equal(_value) }
175
+ it { subject.must_be_instance_of(Vedeu::Colours::Background) }
176
176
  end
177
177
 
178
178
  describe '#eql?' do
@@ -192,9 +192,9 @@ module Vedeu
192
192
  describe '#foreground=' do
193
193
  let(:_value) { '#ff0000' }
194
194
 
195
- subject { instance.foreground = (_value) }
195
+ subject { instance.public_send(:foreground=, _value) }
196
196
 
197
- it { subject.must_equal(_value) }
197
+ it { subject.must_be_instance_of(Vedeu::Colours::Foreground) }
198
198
  end
199
199
 
200
200
  describe '#to_s' do
@@ -79,7 +79,7 @@ module Vedeu
79
79
  }
80
80
 
81
81
  before do
82
- Vedeu::Output.stubs(:render).
82
+ Vedeu::Output::Output.stubs(:render).
83
83
  with(hide_cursor).returns(hide_cursor)
84
84
  end
85
85
 
@@ -205,7 +205,7 @@ module Vedeu
205
205
  }
206
206
 
207
207
  before do
208
- Vedeu::Output.stubs(:render).
208
+ Vedeu::Output::Output.stubs(:render).
209
209
  with(show_cursor).returns(show_cursor)
210
210
  end
211
211
 
@@ -15,9 +15,9 @@ module Vedeu
15
15
 
16
16
  context 'when there are cursors are defined' do
17
17
  before do
18
- Vedeu::Focus.reset
18
+ Vedeu::Models::Focus.reset
19
19
  Vedeu.cursors.reset
20
- Vedeu::Focus.add('Vedeu.cursor')
20
+ Vedeu::Models::Focus.add('Vedeu.cursor')
21
21
  Vedeu::Cursors::Cursor.new(name: 'Vedeu.cursor').store
22
22
  end
23
23
 
@@ -26,7 +26,7 @@ module Vedeu
26
26
 
27
27
  context 'when there are no cursors defined' do
28
28
  before do
29
- Vedeu::Focus.reset
29
+ Vedeu::Models::Focus.reset
30
30
  Vedeu.cursors.reset
31
31
  end
32
32
 
@@ -2,43 +2,47 @@ require 'test_helper'
2
2
 
3
3
  module Vedeu
4
4
 
5
- describe Subprocess do
5
+ module Distributed
6
6
 
7
- let(:described) { Vedeu::Subprocess }
8
- let(:instance) { described.new(application) }
9
- let(:application) {}
7
+ describe Subprocess do
10
8
 
11
- describe '#initialize' do
12
- it { instance.must_be_instance_of(described) }
13
- it do
14
- instance.instance_variable_get('@application').must_equal(application)
15
- end
16
- it { instance.instance_variable_get('@pid').must_equal(nil) }
17
- end
9
+ let(:described) { Vedeu::Distributed::Subprocess }
10
+ let(:instance) { described.new(application) }
11
+ let(:application) {}
18
12
 
19
- describe '.execute!' do
20
- it { described.must_respond_to(:execute!) }
21
- end
13
+ describe '#initialize' do
14
+ it { instance.must_be_instance_of(described) }
15
+ it do
16
+ instance.instance_variable_get('@application').must_equal(application)
17
+ end
18
+ it { instance.instance_variable_get('@pid').must_equal(nil) }
19
+ end
22
20
 
23
- describe '#execute!' do
24
- it { instance.must_respond_to(:execute!) }
25
- end
21
+ describe '.execute!' do
22
+ it { described.must_respond_to(:execute!) }
23
+ end
26
24
 
27
- describe '#kill' do
28
- before do
29
- Process.stubs(:kill)
30
- File.stubs(:unlink)
25
+ describe '#execute!' do
26
+ it { instance.must_respond_to(:execute!) }
31
27
  end
32
28
 
33
- subject { instance.kill }
29
+ describe '#kill' do
30
+ before do
31
+ Process.stubs(:kill)
32
+ File.stubs(:unlink)
33
+ end
34
+
35
+ subject { instance.kill }
36
+
37
+ it {
38
+ Process.expects(:kill)
39
+ File.expects(:unlink)
40
+ subject
41
+ }
42
+ end
34
43
 
35
- it {
36
- Process.expects(:kill)
37
- File.expects(:unlink)
38
- subject
39
- }
40
- end
44
+ end # Subprocess
41
45
 
42
- end # Subprocess
46
+ end # Distributed
43
47
 
44
48
  end # Vedeu