vedeu 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vedeu/all.rb +2 -13
  3. data/lib/vedeu/api.rb +9 -9
  4. data/lib/vedeu/application/application_view.rb +3 -5
  5. data/lib/vedeu/bindings/bindings.rb +5 -1
  6. data/lib/vedeu/bindings/focus.rb +0 -5
  7. data/lib/vedeu/bindings/refresh.rb +0 -5
  8. data/lib/vedeu/bindings/system.rb +1 -6
  9. data/lib/vedeu/colours/all.rb +17 -0
  10. data/lib/vedeu/colours/background.rb +32 -28
  11. data/lib/vedeu/colours/backgrounds.rb +13 -9
  12. data/lib/vedeu/colours/colour.rb +106 -102
  13. data/lib/vedeu/colours/foreground.rb +32 -28
  14. data/lib/vedeu/colours/foregrounds.rb +13 -9
  15. data/lib/vedeu/colours/repository.rb +70 -0
  16. data/lib/vedeu/colours/translator.rb +267 -0
  17. data/lib/vedeu/configuration/api.rb +10 -7
  18. data/lib/vedeu/configuration/configuration.rb +2 -1
  19. data/lib/vedeu/dsl/border.rb +15 -2
  20. data/lib/vedeu/dsl/composition.rb +6 -4
  21. data/lib/vedeu/dsl/geometry.rb +14 -7
  22. data/lib/vedeu/dsl/group.rb +2 -2
  23. data/lib/vedeu/dsl/interface.rb +5 -3
  24. data/lib/vedeu/dsl/keymap.rb +9 -7
  25. data/lib/vedeu/dsl/line.rb +7 -4
  26. data/lib/vedeu/dsl/menu.rb +3 -0
  27. data/lib/vedeu/dsl/presentation.rb +20 -10
  28. data/lib/vedeu/dsl/shared.rb +4 -4
  29. data/lib/vedeu/dsl/stream.rb +2 -2
  30. data/lib/vedeu/dsl/text.rb +11 -5
  31. data/lib/vedeu/dsl/use.rb +2 -2
  32. data/lib/vedeu/dsl/view.rb +8 -6
  33. data/lib/vedeu/events/aliases.rb +91 -0
  34. data/lib/vedeu/events/all.rb +15 -0
  35. data/lib/vedeu/events/collection.rb +13 -0
  36. data/lib/vedeu/events/event.rb +244 -239
  37. data/lib/vedeu/events/repository.rb +30 -0
  38. data/lib/vedeu/events/trigger.rb +68 -64
  39. data/lib/vedeu/exceptions.rb +65 -54
  40. data/lib/vedeu/geometry/coordinate.rb +3 -1
  41. data/lib/vedeu/geometry/grid.rb +2 -4
  42. data/lib/vedeu/input/editor/all.rb +2 -1
  43. data/lib/vedeu/input/editor/{virtual_cursor.rb → cursor.rb} +10 -10
  44. data/lib/vedeu/input/editor/document.rb +7 -7
  45. data/lib/vedeu/input/editor/insert.rb +70 -0
  46. data/lib/vedeu/input/editor/line.rb +4 -16
  47. data/lib/vedeu/input/editor/lines.rb +2 -16
  48. data/lib/vedeu/input/input_translator.rb +2 -2
  49. data/lib/vedeu/input/key.rb +2 -2
  50. data/lib/vedeu/internal_api.rb +6 -6
  51. data/lib/vedeu/log/lockless_log_device.rb +0 -74
  52. data/lib/vedeu/models/focus.rb +3 -3
  53. data/lib/vedeu/models/interface.rb +3 -3
  54. data/lib/vedeu/models/menu.rb +2 -2
  55. data/lib/vedeu/models/views/char.rb +1 -1
  56. data/lib/vedeu/models/views/composition.rb +1 -1
  57. data/lib/vedeu/models/views/line.rb +1 -1
  58. data/lib/vedeu/models/views/stream.rb +1 -1
  59. data/lib/vedeu/models/views/view.rb +6 -7
  60. data/lib/vedeu/output/presentation/colour.rb +23 -21
  61. data/lib/vedeu/output/renderers/renderer_options.rb +2 -4
  62. data/lib/vedeu/output/text.rb +1 -1
  63. data/lib/vedeu/output/wordwrap.rb +18 -7
  64. data/lib/vedeu/plugins/plugin.rb +2 -2
  65. data/lib/vedeu/refresh/refresh_buffer.rb +3 -3
  66. data/lib/vedeu/refresh/refresh_group.rb +3 -3
  67. data/lib/vedeu/repositories/repository.rb +7 -6
  68. data/lib/vedeu/runtime/application.rb +1 -1
  69. data/lib/vedeu/runtime/main_loop.rb +3 -3
  70. data/lib/vedeu/runtime/router.rb +14 -11
  71. data/lib/vedeu/templating/helpers.rb +5 -5
  72. data/lib/vedeu/templating/template.rb +4 -4
  73. data/lib/vedeu/templating/view_template.rb +1 -1
  74. data/lib/vedeu/terminal/terminal.rb +2 -2
  75. data/lib/vedeu/version.rb +1 -1
  76. data/test/lib/vedeu/application/application_view_test.rb +1 -1
  77. data/test/lib/vedeu/colours/background_test.rb +93 -89
  78. data/test/lib/vedeu/colours/backgrounds_test.rb +11 -7
  79. data/test/lib/vedeu/colours/colour_test.rb +155 -151
  80. data/test/lib/vedeu/colours/foreground_test.rb +93 -89
  81. data/test/lib/vedeu/colours/foregrounds_test.rb +11 -7
  82. data/test/lib/vedeu/colours/repository_test.rb +97 -0
  83. data/test/lib/vedeu/colours/translator_test.rb +173 -0
  84. data/test/lib/vedeu/configuration/api_test.rb +4 -4
  85. data/test/lib/vedeu/dsl/border_test.rb +12 -0
  86. data/test/lib/vedeu/dsl/composition_test.rb +3 -3
  87. data/test/lib/vedeu/dsl/geometry_test.rb +11 -0
  88. data/test/lib/vedeu/dsl/group_test.rb +2 -2
  89. data/test/lib/vedeu/dsl/interface_test.rb +4 -4
  90. data/test/lib/vedeu/dsl/keymap_test.rb +8 -4
  91. data/test/lib/vedeu/dsl/line_test.rb +6 -3
  92. data/test/lib/vedeu/dsl/menu_test.rb +6 -0
  93. data/test/lib/vedeu/dsl/presentation_test.rb +16 -3
  94. data/test/lib/vedeu/dsl/stream_test.rb +1 -1
  95. data/test/lib/vedeu/dsl/text_test.rb +7 -0
  96. data/test/lib/vedeu/dsl/view_test.rb +3 -3
  97. data/test/lib/vedeu/events/aliases_test.rb +144 -0
  98. data/test/lib/vedeu/events/collection_test.rb +22 -0
  99. data/test/lib/vedeu/events/event_test.rb +84 -80
  100. data/test/lib/vedeu/events/repository_test.rb +28 -0
  101. data/test/lib/vedeu/events/trigger_test.rb +41 -37
  102. data/test/lib/vedeu/geometry/grid_test.rb +4 -4
  103. data/test/lib/vedeu/input/editor/{virtual_cursor_test.rb → cursor_test.rb} +3 -3
  104. data/test/lib/vedeu/input/editor/insert_test.rb +36 -0
  105. data/test/lib/vedeu/input/key_test.rb +1 -1
  106. data/test/lib/vedeu/models/cell_test.rb +1 -1
  107. data/test/lib/vedeu/models/focus_test.rb +4 -2
  108. data/test/lib/vedeu/models/menu_test.rb +1 -1
  109. data/test/lib/vedeu/models/views/char_test.rb +8 -4
  110. data/test/lib/vedeu/models/views/line_test.rb +4 -4
  111. data/test/lib/vedeu/models/views/stream_test.rb +3 -3
  112. data/test/lib/vedeu/models/views/view_test.rb +1 -1
  113. data/test/lib/vedeu/output/html_char_test.rb +4 -2
  114. data/test/lib/vedeu/output/presentation/colour_test.rb +5 -5
  115. data/test/lib/vedeu/output/presentation_test.rb +4 -4
  116. data/test/lib/vedeu/output/renderers/json_test.rb +4 -2
  117. data/test/lib/vedeu/plugins/plugin_test.rb +1 -1
  118. data/test/lib/vedeu/refresh/refresh_buffer_test.rb +1 -1
  119. data/test/lib/vedeu/refresh/refresh_group_test.rb +1 -1
  120. data/test/lib/vedeu/repositories/repository_test.rb +2 -2
  121. data/test/lib/vedeu/runtime/router_test.rb +6 -6
  122. data/test/lib/vedeu/templating/decoder_test.rb +2 -3
  123. data/test/lib/vedeu/templating/encoder_test.rb +2 -3
  124. data/test/lib/vedeu/templating/helpers_test.rb +6 -6
  125. data/test/lib/vedeu/templating/template_test.rb +2 -2
  126. data/test/lib/vedeu/templating/view_template_test.rb +13 -7
  127. data/test/lib/vedeu/terminal/terminal_test.rb +3 -3
  128. metadata +24 -19
  129. data/lib/vedeu/colours/colour_translator.rb +0 -260
  130. data/lib/vedeu/colours/colours.rb +0 -66
  131. data/lib/vedeu/events/event_aliases.rb +0 -87
  132. data/lib/vedeu/events/event_collection.rb +0 -9
  133. data/lib/vedeu/events/events.rb +0 -26
  134. data/test/lib/vedeu/colours/colour_translator_test.rb +0 -169
  135. data/test/lib/vedeu/colours/colours_test.rb +0 -93
  136. data/test/lib/vedeu/events/event_aliases_test.rb +0 -140
  137. data/test/lib/vedeu/events/event_collection_test.rb +0 -18
  138. data/test/lib/vedeu/events/events_test.rb +0 -24
@@ -0,0 +1,22 @@
1
+ require 'test_helper'
2
+
3
+ module Vedeu
4
+
5
+ module Events
6
+
7
+ describe Collection do
8
+
9
+ let(:described) { Vedeu::Events::Collection }
10
+ let(:instance) { described.new }
11
+
12
+ it { described.superclass.must_equal(Vedeu::Collection) }
13
+
14
+ describe '#initialize' do
15
+ it { instance.must_be_instance_of(described) }
16
+ end
17
+
18
+ end # Collection
19
+
20
+ end # Events
21
+
22
+ end # Vedeu
@@ -2,108 +2,112 @@ require 'test_helper'
2
2
 
3
3
  module Vedeu
4
4
 
5
- describe Event do
5
+ module Events
6
6
 
7
- let(:described) { Vedeu::Event }
8
- let(:instance) { described.new(event_name, closure, options) }
9
- let(:event_name) { :some_event }
10
- let(:closure) { proc { :event_triggered } }
11
- let(:options) { {} }
7
+ describe Event do
12
8
 
13
- describe '.bind' do
14
- subject { described.bind(event_name, options) { :event_triggered } }
9
+ let(:described) { Vedeu::Events::Event }
10
+ let(:instance) { described.new(event_name, closure, options) }
11
+ let(:event_name) { :some_event }
12
+ let(:closure) { proc { :event_triggered } }
13
+ let(:options) { {} }
15
14
 
16
- it { described.must_respond_to(:event) }
17
- it { described.must_respond_to(:register) }
18
- it { subject.must_be_instance_of(TrueClass) }
19
- end
15
+ describe '.bind' do
16
+ subject { described.bind(event_name, options) { :event_triggered } }
20
17
 
21
- describe '.bound?' do
22
- subject { described.bound?(event_name) }
23
-
24
- context 'when the event is registered' do
25
- before { Vedeu.bind(event_name) }
26
- after { Vedeu.unbind(event_name) }
27
-
28
- it { subject.must_equal(true) }
18
+ it { described.must_respond_to(:event) }
19
+ it { described.must_respond_to(:register) }
20
+ it { subject.must_be_instance_of(TrueClass) }
29
21
  end
30
22
 
31
- context 'when the event is not registered' do
32
- before { Vedeu.unbind(event_name) }
23
+ describe '.bound?' do
24
+ subject { described.bound?(event_name) }
33
25
 
34
- it { subject.must_equal(false) }
35
- end
36
- end
37
-
38
- describe '.unbind' do
39
- it { described.must_respond_to(:unbind ) }
40
- end
41
-
42
- describe '#initialize' do
43
- it { instance.must_be_instance_of(described) }
44
- it { instance.instance_variable_get('@name').must_equal(event_name) }
45
- it { instance.instance_variable_get('@options').must_equal(options) }
46
- it { instance.instance_variable_get('@deadline').must_equal(0) }
47
- it { instance.instance_variable_get('@executed_at').must_equal(0) }
48
- it { instance.instance_variable_get('@now').must_equal(0) }
49
- it do
50
- instance.instance_variable_get('@repository').must_equal(Vedeu.events)
51
- end
52
- end
26
+ context 'when the event is registered' do
27
+ before { Vedeu.bind(event_name) }
28
+ after { Vedeu.unbind(event_name) }
53
29
 
54
- describe '#bind' do
55
- subject { instance.bind }
30
+ it { subject.must_equal(true) }
31
+ end
56
32
 
57
- context 'when the event name is already registered' do
58
- before { Vedeu.bind(:some_event) { :already_registered } }
33
+ context 'when the event is not registered' do
34
+ before { Vedeu.unbind(event_name) }
59
35
 
60
- it { subject.must_be_instance_of(TrueClass) }
36
+ it { subject.must_equal(false) }
37
+ end
61
38
  end
62
39
 
63
- context 'when the event name is not already registered' do
64
- it { subject.must_be_instance_of(TrueClass) }
40
+ describe '.unbind' do
41
+ it { described.must_respond_to(:unbind ) }
65
42
  end
66
- end
67
-
68
- describe '#trigger' do
69
- it 'returns the result of calling the closure when debouncing' do
70
- event = Event.new(event_name, closure, { debounce: 0.001 })
71
- event.trigger.must_equal(nil)
72
- sleep 0.0005
73
- event.trigger.must_equal(nil)
74
- sleep 0.0009
75
- event.trigger.must_equal(:event_triggered)
76
- sleep 0.0001
77
- event.trigger.must_equal(nil)
43
+
44
+ describe '#initialize' do
45
+ it { instance.must_be_instance_of(described) }
46
+ it { instance.instance_variable_get('@name').must_equal(event_name) }
47
+ it { instance.instance_variable_get('@options').must_equal(options) }
48
+ it { instance.instance_variable_get('@deadline').must_equal(0) }
49
+ it { instance.instance_variable_get('@executed_at').must_equal(0) }
50
+ it { instance.instance_variable_get('@now').must_equal(0) }
51
+ it do
52
+ instance.instance_variable_get('@repository').must_equal(Vedeu.events)
53
+ end
78
54
  end
79
55
 
80
- it 'returns the result of calling the closure when throttling' do
81
- event = Event.new(event_name, closure, { delay: 0.001 })
82
- event.trigger.must_equal(:event_triggered)
83
- sleep 0.0005
84
- event.trigger.must_equal(nil)
85
- sleep 0.0005
86
- event.trigger.must_equal(:event_triggered)
56
+ describe '#bind' do
57
+ subject { instance.bind }
58
+
59
+ context 'when the event name is already registered' do
60
+ before { Vedeu.bind(:some_event) { :already_registered } }
61
+
62
+ it { subject.must_be_instance_of(TrueClass) }
63
+ end
64
+
65
+ context 'when the event name is not already registered' do
66
+ it { subject.must_be_instance_of(TrueClass) }
67
+ end
87
68
  end
88
69
 
89
- it 'returns the result of calling the closure with its arguments' do
90
- event = Event.new(event_name, closure, options)
91
- event.trigger.must_equal(:event_triggered)
70
+ describe '#trigger' do
71
+ it 'returns the result of calling the closure when debouncing' do
72
+ event = described.new(event_name, closure, { debounce: 0.001 })
73
+ event.trigger.must_equal(nil)
74
+ sleep 0.0005
75
+ event.trigger.must_equal(nil)
76
+ sleep 0.0009
77
+ event.trigger.must_equal(:event_triggered)
78
+ sleep 0.0001
79
+ event.trigger.must_equal(nil)
80
+ end
81
+
82
+ it 'returns the result of calling the closure when throttling' do
83
+ event = described.new(event_name, closure, { delay: 0.001 })
84
+ event.trigger.must_equal(:event_triggered)
85
+ sleep 0.0005
86
+ event.trigger.must_equal(nil)
87
+ sleep 0.0005
88
+ event.trigger.must_equal(:event_triggered)
89
+ end
90
+
91
+ it 'returns the result of calling the closure with its arguments' do
92
+ event = described.new(event_name, closure, options)
93
+ event.trigger.must_equal(:event_triggered)
94
+ end
92
95
  end
93
- end
94
96
 
95
- describe '#unbind' do
96
- context 'when the event exists' do
97
- before { Vedeu.bind(:gallium) { :some_action } }
97
+ describe '#unbind' do
98
+ context 'when the event exists' do
99
+ before { Vedeu.bind(:gallium) { :some_action } }
98
100
 
99
- it { Vedeu.unbind(:gallium).must_equal(true) }
100
- end
101
+ it { Vedeu.unbind(:gallium).must_equal(true) }
102
+ end
101
103
 
102
- context 'when the event does not exist' do
103
- it { Vedeu.unbind(:gallium).must_equal(false) }
104
+ context 'when the event does not exist' do
105
+ it { Vedeu.unbind(:gallium).must_equal(false) }
106
+ end
104
107
  end
105
- end
106
108
 
107
- end # Event
109
+ end # Event
110
+
111
+ end # Events
108
112
 
109
113
  end # Vedeu
@@ -0,0 +1,28 @@
1
+ require 'test_helper'
2
+
3
+ module Vedeu
4
+
5
+ module Events
6
+
7
+ describe Repository do
8
+
9
+ let(:described) { Vedeu::Events::Repository }
10
+
11
+ it { described.must_respond_to(:events) }
12
+
13
+ describe '.reset!' do
14
+ subject { described.reset! }
15
+
16
+ it { described.must_respond_to(:reset) }
17
+
18
+ it {
19
+ described.expects(:new).with(Vedeu::Events::Collection)
20
+ subject
21
+ }
22
+ end
23
+
24
+ end # Repository
25
+
26
+ end # Events
27
+
28
+ end # Vedeu
@@ -2,59 +2,63 @@ require 'test_helper'
2
2
 
3
3
  module Vedeu
4
4
 
5
- describe Trigger do
5
+ module Events
6
6
 
7
- let(:described) { Vedeu::Trigger }
8
- let(:instance) { described.new(event_name, args) }
9
- let(:event_name) { :_testing_event_ }
10
- let(:args) {}
7
+ describe Trigger do
11
8
 
12
- describe '.trigger' do
13
- before { Vedeu.bind(event_name) { :_only_one_result_ } }
9
+ let(:described) { Vedeu::Events::Trigger }
10
+ let(:instance) { described.new(event_name, args) }
11
+ let(:event_name) { :_testing_event_ }
12
+ let(:args) {}
14
13
 
15
- subject { described.trigger(event_name) }
14
+ describe '.trigger' do
15
+ before { Vedeu.bind(event_name) { :_only_one_result_ } }
16
16
 
17
- it { subject.must_equal(:_only_one_result_) }
18
- end
17
+ subject { described.trigger(event_name) }
19
18
 
20
- describe '#initialize' do
21
- it { instance.must_be_instance_of(described) }
22
- it { instance.instance_variable_get('@name').must_equal(event_name) }
23
- it { instance.instance_variable_get('@args').must_equal([args]) }
24
- it do
25
- instance.instance_variable_get('@repository').must_equal(Vedeu.events)
19
+ it { subject.must_equal(:_only_one_result_) }
26
20
  end
27
- end
28
21
 
29
- describe '#trigger' do
30
- subject { instance.trigger }
22
+ describe '#initialize' do
23
+ it { instance.must_be_instance_of(described) }
24
+ it { instance.instance_variable_get('@name').must_equal(event_name) }
25
+ it { instance.instance_variable_get('@args').must_equal([args]) }
26
+ it do
27
+ instance.instance_variable_get('@repository').must_equal(Vedeu.events)
28
+ end
29
+ end
31
30
 
32
- context 'when only one result occurs from triggering the event' do
33
- let(:event_name) { :_one_result_ }
31
+ describe '#trigger' do
32
+ subject { instance.trigger }
34
33
 
35
- before { Vedeu.bind(event_name) { :_only_one_result_ } }
34
+ context 'when only one result occurs from triggering the event' do
35
+ let(:event_name) { :_one_result_ }
36
36
 
37
- it { subject.must_equal(:_only_one_result_) }
38
- end
37
+ before { Vedeu.bind(event_name) { :_only_one_result_ } }
39
38
 
40
- context 'when multiple results occur from triggering an event' do
41
- let(:event_name) { :_multiple_results_ }
39
+ it { subject.must_equal(:_only_one_result_) }
40
+ end
42
41
 
43
- before {
44
- Vedeu::Event.register(event_name) { :_result_one_ }
45
- Vedeu::Event.register(event_name) { :_result_two_ }
46
- }
42
+ context 'when multiple results occur from triggering an event' do
43
+ let(:event_name) { :_multiple_results_ }
47
44
 
48
- it { subject.must_equal([:_result_one_, :_result_two_]) }
49
- end
45
+ before {
46
+ Vedeu::Events::Event.register(event_name) { :_result_one_ }
47
+ Vedeu::Events::Event.register(event_name) { :_result_two_ }
48
+ }
50
49
 
51
- context 'when the event has not been registered' do
52
- let(:event_name) { :_not_found_ }
50
+ it { subject.must_equal([:_result_one_, :_result_two_]) }
51
+ end
53
52
 
54
- it { subject.must_equal([]) }
53
+ context 'when the event has not been registered' do
54
+ let(:event_name) { :_not_found_ }
55
+
56
+ it { subject.must_equal([]) }
57
+ end
55
58
  end
56
- end
57
59
 
58
- end # Trigger
60
+ end # Trigger
61
+
62
+ end # Events
59
63
 
60
64
  end # Vedeu
@@ -17,11 +17,11 @@ module Vedeu
17
17
 
18
18
  describe '.columns' do
19
19
  context 'when the value is less than 1' do
20
- it { proc { Grid.columns(0) }.must_raise(Vedeu::OutOfRange) }
20
+ it { proc { Grid.columns(0) }.must_raise(Vedeu::Error::OutOfRange) }
21
21
  end
22
22
 
23
23
  context 'when the value is greater than 12' do
24
- it { proc { Grid.columns(13) }.must_raise(Vedeu::OutOfRange) }
24
+ it { proc { Grid.columns(13) }.must_raise(Vedeu::Error::OutOfRange) }
25
25
  end
26
26
 
27
27
  context 'when the value is in range' do
@@ -33,11 +33,11 @@ module Vedeu
33
33
 
34
34
  describe '.rows' do
35
35
  context 'when the value is less than 1' do
36
- it { proc { Grid.rows(0) }.must_raise(Vedeu::OutOfRange) }
36
+ it { proc { Grid.rows(0) }.must_raise(Vedeu::Error::OutOfRange) }
37
37
  end
38
38
 
39
39
  context 'when the value is greater than 12' do
40
- it { proc { Grid.rows(13) }.must_raise(Vedeu::OutOfRange) }
40
+ it { proc { Grid.rows(13) }.must_raise(Vedeu::Error::OutOfRange) }
41
41
  end
42
42
 
43
43
  context 'when the value is in range' do
@@ -4,9 +4,9 @@ module Vedeu
4
4
 
5
5
  module Editor
6
6
 
7
- describe VirtualCursor do
7
+ describe Cursor do
8
8
 
9
- let(:described) { Vedeu::Editor::VirtualCursor }
9
+ let(:described) { Vedeu::Editor::Cursor }
10
10
  let(:instance) { described.new(attributes) }
11
11
  let(:attributes) {
12
12
  {
@@ -183,7 +183,7 @@ module Vedeu
183
183
  # it { skip }
184
184
  end
185
185
 
186
- end # VirtualCursor
186
+ end # Cursor
187
187
 
188
188
  end # Editor
189
189
 
@@ -0,0 +1,36 @@
1
+ require 'test_helper'
2
+
3
+ module Vedeu
4
+
5
+ module Editor
6
+
7
+ describe Insert do
8
+
9
+ let(:described) { Vedeu::Editor::Insert }
10
+ let(:instance) { described.new(collection, entity, index, size) }
11
+ let(:collection) {}
12
+ let(:entity) {}
13
+ let(:index) {}
14
+ let(:size) {}
15
+
16
+ describe '#initialize' do
17
+ it { instance.must_be_instance_of(described) }
18
+ it { instance.instance_variable_get('@collection').must_equal(collection) }
19
+ it { instance.instance_variable_get('@entity').must_equal(entity) }
20
+ it { instance.instance_variable_get('@index').must_equal(index) }
21
+ it { instance.instance_variable_get('@size').must_equal(size) }
22
+ end
23
+
24
+ describe '.into' do
25
+ subject { described.into(collection, entity, index, size) }
26
+ end
27
+
28
+ describe '#insert' do
29
+ it { instance.must_respond_to(:insert) }
30
+ end
31
+
32
+ end # Insert
33
+
34
+ end # Editor
35
+
36
+ end # Vedeu
@@ -15,7 +15,7 @@ module Vedeu
15
15
  context 'when the required block is not given' do
16
16
  subject { described.new(input) }
17
17
 
18
- it { proc { subject }.must_raise(Vedeu::InvalidSyntax) }
18
+ it { proc { subject }.must_raise(Vedeu::Error::InvalidSyntax) }
19
19
  end
20
20
  end
21
21
 
@@ -15,7 +15,7 @@ module Vedeu
15
15
  y: y,
16
16
  }
17
17
  }
18
- let(:colour) { Colour.new(background: '#000000') }
18
+ let(:colour) { Vedeu::Colours::Colour.new(background: '#000000') }
19
19
  let(:style) {}
20
20
  let(:_value) {}
21
21
  let(:x) {}