vedeu 0.8.9 → 0.8.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +1 -0
  3. data/docs/configuration/drb.md +6 -0
  4. data/docs/configuration/drb_host.md +6 -0
  5. data/docs/configuration/drb_port.md +6 -0
  6. data/docs/configuration/interactive.md +21 -0
  7. data/docs/configuration/run_once.md +8 -0
  8. data/docs/configuration/standalone.md +20 -0
  9. data/docs/dsl.md +1 -1
  10. data/lib/vedeu.rb +15 -5
  11. data/lib/vedeu/application/controller.rb +5 -6
  12. data/lib/vedeu/borders/border.rb +1 -5
  13. data/lib/vedeu/borders/title.rb +6 -1
  14. data/lib/vedeu/buffers/buffer.rb +1 -3
  15. data/lib/vedeu/buffers/empty.rb +1 -3
  16. data/lib/vedeu/buffers/refresh.rb +1 -1
  17. data/lib/vedeu/buffers/view.rb +1 -1
  18. data/lib/vedeu/cells/border.rb +1 -1
  19. data/lib/vedeu/cells/borders/edges/bottom_horizontal.rb +1 -1
  20. data/lib/vedeu/cells/borders/edges/left_vertical.rb +1 -1
  21. data/lib/vedeu/cells/borders/edges/right_vertical.rb +1 -1
  22. data/lib/vedeu/cells/borders/edges/top_horizontal.rb +1 -1
  23. data/lib/vedeu/cells/borders/horizontal.rb +1 -1
  24. data/lib/vedeu/cells/borders/vertical.rb +1 -1
  25. data/lib/vedeu/cells/borders/vertices/bottom_left.rb +1 -1
  26. data/lib/vedeu/cells/borders/vertices/bottom_right.rb +1 -1
  27. data/lib/vedeu/cells/borders/vertices/top_left.rb +1 -1
  28. data/lib/vedeu/cells/borders/vertices/top_right.rb +1 -1
  29. data/lib/vedeu/cells/cursor.rb +1 -1
  30. data/lib/vedeu/cells/empty.rb +1 -1
  31. data/lib/vedeu/coercers/coercer.rb +8 -0
  32. data/lib/vedeu/coercers/colour.rb +6 -4
  33. data/lib/vedeu/coercers/editor_line.rb +4 -1
  34. data/lib/vedeu/coercers/editor_lines.rb +18 -3
  35. data/lib/vedeu/coercers/lines.rb +2 -1
  36. data/lib/vedeu/coercers/page.rb +2 -6
  37. data/lib/vedeu/coercers/position.rb +1 -3
  38. data/lib/vedeu/coercers/row.rb +0 -1
  39. data/lib/vedeu/colours/colour.rb +1 -2
  40. data/lib/vedeu/configuration/api.rb +6 -69
  41. data/lib/vedeu/configuration/configuration.rb +1 -4
  42. data/lib/vedeu/cursors/coordinate.rb +1 -3
  43. data/lib/vedeu/cursors/cursor.rb +4 -7
  44. data/lib/vedeu/cursors/reposition.rb +1 -1
  45. data/lib/vedeu/distributed/test_application.rb +1 -3
  46. data/lib/vedeu/dsl/border.rb +3 -4
  47. data/lib/vedeu/dsl/geometry.rb +6 -7
  48. data/lib/vedeu/dsl/helpers/align.rb +1 -1
  49. data/lib/vedeu/dsl/helpers/attributes.rb +2 -2
  50. data/lib/vedeu/dsl/helpers/truncate.rb +1 -2
  51. data/lib/vedeu/dsl/helpers/wordwrap.rb +1 -3
  52. data/lib/vedeu/dsl/presentation.rb +18 -0
  53. data/lib/vedeu/editor/cursor.rb +1 -3
  54. data/lib/vedeu/editor/document.rb +1 -3
  55. data/lib/vedeu/editor/line.rb +4 -12
  56. data/lib/vedeu/editor/lines.rb +3 -29
  57. data/lib/vedeu/events/event.rb +1 -3
  58. data/lib/vedeu/geometries/area/dimension.rb +1 -3
  59. data/lib/vedeu/geometries/area/x_dimension.rb +1 -1
  60. data/lib/vedeu/geometries/area/y_dimension.rb +1 -1
  61. data/lib/vedeu/geometries/geometry.rb +1 -4
  62. data/lib/vedeu/geometries/move.rb +1 -1
  63. data/lib/vedeu/groups/group.rb +4 -7
  64. data/lib/vedeu/input/keymap.rb +1 -3
  65. data/lib/vedeu/input/keys.rb +2 -0
  66. data/lib/vedeu/input/mapper.rb +2 -0
  67. data/lib/vedeu/input/mouse.rb +2 -0
  68. data/lib/vedeu/input/read.rb +1 -7
  69. data/lib/vedeu/interfaces/clear.rb +1 -1
  70. data/lib/vedeu/interfaces/interface.rb +11 -6
  71. data/lib/vedeu/logging/lockless_log_device.rb +18 -2
  72. data/lib/vedeu/logging/timer.rb +17 -9
  73. data/lib/vedeu/menus/menu.rb +1 -3
  74. data/lib/vedeu/models/toggleable.rb +5 -6
  75. data/lib/vedeu/output/all.rb +3 -0
  76. data/lib/vedeu/output/compressor.rb +1 -1
  77. data/lib/vedeu/output/output.rb +2 -3
  78. data/lib/vedeu/output/refresh.rb +1 -1
  79. data/lib/vedeu/output/write.rb +3 -2
  80. data/lib/vedeu/renderers/options.rb +1 -3
  81. data/lib/vedeu/repositories/defaults.rb +1 -1
  82. data/lib/vedeu/repositories/model.rb +5 -6
  83. data/lib/vedeu/repositories/registerable.rb +6 -8
  84. data/lib/vedeu/runtime/flags.rb +2 -2
  85. data/lib/vedeu/support/y_coordinate.rb +1 -1
  86. data/lib/vedeu/version.rb +1 -1
  87. data/lib/vedeu/views/composition.rb +1 -3
  88. data/lib/vedeu/views/default_attributes.rb +2 -4
  89. data/lib/vedeu/views/value.rb +6 -8
  90. data/lib/vedeu/views/view.rb +9 -3
  91. data/test/lib/vedeu/application/application_helper_test.rb +3 -2
  92. data/test/lib/vedeu/application/controller_test.rb +10 -11
  93. data/test/lib/vedeu/application/helper_test.rb +3 -2
  94. data/test/lib/vedeu/application/view_test.rb +4 -3
  95. data/test/lib/vedeu/coercers/editor_line_test.rb +21 -0
  96. data/test/lib/vedeu/coercers/editor_lines_test.rb +41 -0
  97. data/test/lib/vedeu/coercers/page_test.rb +1 -1
  98. data/test/lib/vedeu/cursors/dsl_test.rb +11 -10
  99. data/test/lib/vedeu/dsl/dsl_test.rb +3 -2
  100. data/test/lib/vedeu/dsl/elements_test.rb +19 -21
  101. data/test/lib/vedeu/dsl/presentation_test.rb +42 -0
  102. data/test/lib/vedeu/editor/collection_test.rb +5 -4
  103. data/test/lib/vedeu/editor/line_test.rb +4 -27
  104. data/test/lib/vedeu/editor/lines_test.rb +4 -54
  105. data/test/lib/vedeu/logging/timer_test.rb +11 -1
  106. data/test/lib/vedeu/models/toggleable_test.rb +27 -25
  107. data/test/lib/vedeu/output/compressor_cache_test.rb +0 -3
  108. data/test/lib/vedeu/presentation/colour_test.rb +13 -12
  109. data/test/lib/vedeu/presentation/presentation_test.rb +4 -2
  110. data/test/lib/vedeu/presentation/styles_test.rb +5 -3
  111. data/test/lib/vedeu/renderers/options_test.rb +10 -12
  112. data/test/lib/vedeu/repositories/assemblage_test.rb +11 -10
  113. data/test/lib/vedeu/repositories/collection_test.rb +1 -1
  114. data/test/lib/vedeu/repositories/defaults_test.rb +9 -7
  115. data/test/lib/vedeu/repositories/model_test.rb +10 -9
  116. data/test/lib/vedeu/repositories/registerable_test.rb +19 -18
  117. data/test/lib/vedeu/repositories/repository_test.rb +7 -7
  118. data/test/lib/vedeu/repositories/store_test.rb +14 -13
  119. data/test/lib/vedeu/templating/helpers_test.rb +9 -8
  120. data/test/lib/vedeu/views/default_attributes_test.rb +17 -17
  121. data/test/lib/vedeu/views/value_test.rb +0 -1
  122. data/test/support/helpers/model_test_class.rb +1 -2
  123. metadata +8 -2
@@ -23,13 +23,14 @@ module Vedeu
23
23
  describe DSL do
24
24
 
25
25
  let(:described) { Vedeu::DSL }
26
- let(:instance) { Vedeu::DSLModuleTestClass.new(model, client) }
26
+ let(:included_described) { Vedeu::DSLModuleTestClass }
27
+ let(:included_instance) { included_described.new(model, client) }
27
28
  let(:model) { Vedeu::DSLModelTestClass.new(_name) }
28
29
  let(:client) {}
29
30
  let(:_name) {}
30
31
 
31
32
  describe '#name' do
32
- subject { instance.name }
33
+ subject { included_instance.name }
33
34
 
34
35
  context 'when the model is nil' do
35
36
  let(:model) {}
@@ -20,12 +20,10 @@ module Vedeu
20
20
 
21
21
  describe Elements do
22
22
 
23
- let(:described) { Vedeu::DSL::Elements }
24
- let(:instance) {}
25
-
26
- let(:including_described) { Vedeu::DSL::ElementsTest }
27
- let(:including_instance) { including_described.new(model) }
28
- let(:model) {}
23
+ let(:described) { Vedeu::DSL::Elements }
24
+ let(:included_described) { Vedeu::DSL::ElementsTest }
25
+ let(:included_instance) { included_described.new(model) }
26
+ let(:model) {}
29
27
 
30
28
  describe '#centre' do
31
29
  let(:_value) {}
@@ -35,7 +33,7 @@ module Vedeu
35
33
  }
36
34
  }
37
35
 
38
- subject { including_instance.centre(_value, opts) }
36
+ subject { included_instance.centre(_value, opts) }
39
37
 
40
38
  context 'when a model exists' do
41
39
  end
@@ -46,7 +44,7 @@ module Vedeu
46
44
  end
47
45
 
48
46
  describe '#center' do
49
- it { including_instance.must_respond_to(:center) }
47
+ it { included_instance.must_respond_to(:center) }
50
48
  end
51
49
 
52
50
  describe '#left' do
@@ -57,7 +55,7 @@ module Vedeu
57
55
  }
58
56
  }
59
57
 
60
- subject { including_instance.left(_value, opts) }
58
+ subject { included_instance.left(_value, opts) }
61
59
 
62
60
  context 'when a model exists' do
63
61
  end
@@ -75,7 +73,7 @@ module Vedeu
75
73
  }
76
74
  }
77
75
 
78
- subject { including_instance.right(_value, opts) }
76
+ subject { included_instance.right(_value, opts) }
79
77
 
80
78
  context 'when a model exists' do
81
79
  end
@@ -88,7 +86,7 @@ module Vedeu
88
86
  describe '#lines' do
89
87
  let(:opts) { {} }
90
88
 
91
- subject { including_instance.lines(opts) { } }
89
+ subject { included_instance.lines(opts) { } }
92
90
 
93
91
  context 'when the block is given' do
94
92
  context 'when a model exists' do
@@ -101,20 +99,20 @@ module Vedeu
101
99
  end
102
100
 
103
101
  context 'when the block is not given' do
104
- subject { including_instance.lines }
102
+ subject { included_instance.lines }
105
103
 
106
104
  it { proc { subject }.must_raise(Vedeu::Error::RequiresBlock) }
107
105
  end
108
106
 
109
107
  context 'when the opts parameter is not given' do
110
- subject { including_instance.lines { } }
108
+ subject { included_instance.lines { } }
111
109
 
112
110
  # @todo Add more tests.
113
111
  end
114
112
  end
115
113
 
116
114
  describe '#line' do
117
- subject { including_instance.line { } }
115
+ subject { included_instance.line { } }
118
116
 
119
117
  context 'when a model exists' do
120
118
  let(:model) { Vedeu::Views::View.new }
@@ -124,7 +122,7 @@ module Vedeu
124
122
  end
125
123
 
126
124
  context 'when the block is not given' do
127
- subject { including_instance.line }
125
+ subject { included_instance.line }
128
126
 
129
127
  # @todo Add more tests.
130
128
  end
@@ -138,7 +136,7 @@ module Vedeu
138
136
  describe '#streams' do
139
137
  let(:opts) { {} }
140
138
 
141
- subject { including_instance.streams(opts) { } }
139
+ subject { included_instance.streams(opts) { } }
142
140
 
143
141
  context 'when the block is given' do
144
142
  context 'when a model exists' do
@@ -153,20 +151,20 @@ module Vedeu
153
151
  end
154
152
 
155
153
  context 'when the block is not given' do
156
- subject { including_instance.streams }
154
+ subject { included_instance.streams }
157
155
 
158
156
  it { proc { subject }.must_raise(Vedeu::Error::RequiresBlock) }
159
157
  end
160
158
 
161
159
  context 'when the opts parameter is not given' do
162
- subject { including_instance.streams { } }
160
+ subject { included_instance.streams { } }
163
161
 
164
162
  # @todo Add more tests.
165
163
  end
166
164
  end
167
165
 
168
166
  describe '#stream' do
169
- subject { including_instance.stream { } }
167
+ subject { included_instance.stream { } }
170
168
 
171
169
  context 'when a model exists' do
172
170
  let(:model) { Vedeu::Views::View.new }
@@ -176,7 +174,7 @@ module Vedeu
176
174
  end
177
175
 
178
176
  context 'when the block is not given' do
179
- subject { including_instance.stream }
177
+ subject { included_instance.stream }
180
178
 
181
179
  # @todo Add more tests.
182
180
  end
@@ -195,7 +193,7 @@ module Vedeu
195
193
  }
196
194
  }
197
195
 
198
- subject { including_instance.text(_value, opts) }
196
+ subject { included_instance.text(_value, opts) }
199
197
 
200
198
  context 'when a model exists' do
201
199
  end
@@ -118,6 +118,12 @@ module Vedeu
118
118
  it { instance.must_respond_to(:colour=) }
119
119
  end
120
120
 
121
+ describe '#no_wordwrap!' do
122
+ it { instance.must_respond_to(:no_wordwrap!) }
123
+
124
+ # @todo Add more tests.
125
+ end
126
+
121
127
  describe '#style' do
122
128
  let(:args) { :bold }
123
129
 
@@ -138,6 +144,42 @@ module Vedeu
138
144
  it { instance.must_respond_to(:styles=) }
139
145
  end
140
146
 
147
+ describe '#wordwrap' do
148
+ context 'when the value is not given' do
149
+ subject { instance.wordwrap }
150
+
151
+ it { subject.must_equal(true) }
152
+ end
153
+
154
+ context 'when the value is given' do
155
+ subject { instance.wordwrap(_value) }
156
+
157
+ context 'when the value is nil' do
158
+ let(:_value) { nil }
159
+
160
+ it { subject.must_equal(false) }
161
+ end
162
+
163
+ context 'when the value is false' do
164
+ let(:_value) { false }
165
+
166
+ it { subject.must_equal(false) }
167
+ end
168
+
169
+ context 'when the value evaluates as true' do
170
+ let(:_value) { :a_true_value }
171
+
172
+ it { subject.must_equal(true) }
173
+ end
174
+ end
175
+
176
+ it { instance.must_respond_to(:wordwrap) }
177
+ end
178
+
179
+ describe '#wordwrap!' do
180
+ it { instance.must_respond_to(:wordwrap!) }
181
+ end
182
+
141
183
  end # Presentation
142
184
 
143
185
  end # DSL
@@ -21,14 +21,15 @@ module Vedeu
21
21
 
22
22
  describe Collection do
23
23
 
24
- let(:described) { Vedeu::Editor::Collection }
25
- let(:instance) { Vedeu::Editor::CollectionTestClass.new(collection) }
26
- let(:collection) { 'Some text...'.chars }
24
+ let(:described) { Vedeu::Editor::Collection }
25
+ let(:included_described) { Vedeu::Editor::CollectionTestClass }
26
+ let(:included_instance) { included_described.new(collection) }
27
+ let(:collection) { 'Some text...'.chars }
27
28
 
28
29
  describe '#by_index' do
29
30
  let(:index) { 0 }
30
31
 
31
- subject { instance.by_index(index) }
32
+ subject { included_instance.by_index(index) }
32
33
 
33
34
  it { subject.must_be_instance_of(String) }
34
35
  end
@@ -23,6 +23,10 @@ module Vedeu
23
23
  end
24
24
  end
25
25
 
26
+ describe '.coerce' do
27
+ it { described.must_respond_to(:coerce) }
28
+ end
29
+
26
30
  describe '#collection' do
27
31
  it { instance.must_respond_to(:collection) }
28
32
  end
@@ -31,33 +35,6 @@ module Vedeu
31
35
  it { instance.must_respond_to(:collection=) }
32
36
  end
33
37
 
34
- describe '.coerce' do
35
- let(:_value) {}
36
-
37
- subject { described.coerce(_value) }
38
-
39
- it { subject.must_be_instance_of(Vedeu::Editor::Line) }
40
-
41
- context 'when the value is already a Vedeu::Editor::Line object' do
42
- let(:_value) { Vedeu::Editor::Line.new(collection) }
43
-
44
- it { subject.must_equal(_value) }
45
- it { subject.collection.must_equal(collection) }
46
- end
47
-
48
- context 'when the value is an empty String' do
49
- let(:_value) { '' }
50
-
51
- it { subject.collection.must_equal('') }
52
- end
53
-
54
- context 'when the value is an String' do
55
- let(:_value) { collection }
56
-
57
- it { subject.collection.must_equal(collection) }
58
- end
59
- end
60
-
61
38
  describe '#character' do
62
39
  let(:index) { 5 }
63
40
 
@@ -29,6 +29,10 @@ module Vedeu
29
29
  end
30
30
  end
31
31
 
32
+ describe '.coerce' do
33
+ it { described.must_respond_to(:coerce) }
34
+ end
35
+
32
36
  describe '#collection' do
33
37
  it { instance.must_respond_to(:collection) }
34
38
  end
@@ -41,60 +45,6 @@ module Vedeu
41
45
  it { instance.must_respond_to(:lines) }
42
46
  end
43
47
 
44
- describe '.coerce' do
45
- let(:document) {}
46
-
47
- subject { described.coerce(document) }
48
-
49
- it { subject.must_be_instance_of(described) }
50
-
51
- context 'when the document is already a Vedeu::Editor::Lines object' do
52
- let(:document) { Vedeu::Editor::Lines.new(collection) }
53
-
54
- it { subject.must_equal(document) }
55
- it { subject.collection.must_equal(collection) }
56
- end
57
-
58
- context 'when the document is an empty Array' do
59
- let(:document) { [] }
60
-
61
- it { subject.collection.must_equal([]) }
62
- end
63
-
64
- context 'when the document is an Array' do
65
- let(:document) {
66
- [
67
- Vedeu::Editor::Line.new('Some text...'),
68
- :more_text,
69
- 'Other text...',
70
- ]
71
- }
72
- let(:expected) {
73
- [
74
- Vedeu::Editor::Line.new('Some text...'),
75
- Vedeu::Editor::Line.new(''),
76
- Vedeu::Editor::Line.new('Other text...'),
77
- ]
78
- }
79
-
80
- it { subject.collection.must_equal(expected) }
81
- end
82
-
83
- context 'when the document is a String' do
84
- let(:document) { "Some text...\nMore text..." }
85
-
86
- context 'but it is empty' do
87
- let(:document) { '' }
88
-
89
- it { subject.must_equal(Vedeu::Editor::Lines.new) }
90
- end
91
-
92
- context 'but it has no line breaks' do
93
-
94
- end
95
- end
96
- end
97
-
98
48
  describe '#delete_character' do
99
49
  let(:x) { 0 }
100
50
  let(:y) { 0 }
@@ -51,7 +51,17 @@ module Vedeu
51
51
  context 'when the block is not given' do
52
52
  subject { instance.measure }
53
53
 
54
- it { proc { subject }.must_raise(Vedeu::Error::RequiresBlock) }
54
+ context 'when debugging is enabled' do
55
+ before { Vedeu.config.stubs(:debug?).returns(true) }
56
+
57
+ it { proc { subject }.must_raise(Vedeu::Error::RequiresBlock) }
58
+ end
59
+
60
+ context 'when debugging is disabled' do
61
+ before { Vedeu.config.stubs(:debug?).returns(false) }
62
+
63
+ it { subject.must_equal(nil) }
64
+ end
55
65
  end
56
66
  end
57
67
 
@@ -5,6 +5,7 @@ require 'test_helper'
5
5
  module Vedeu
6
6
 
7
7
  class ToggleableTestClass
8
+
8
9
  include Vedeu::Toggleable
9
10
 
10
11
  def initialize(boolean)
@@ -14,79 +15,80 @@ module Vedeu
14
15
  def store
15
16
  self
16
17
  end
17
- end
18
+
19
+ end # ToggleableTestClass
18
20
 
19
21
  describe Toggleable do
20
22
 
21
23
  let(:described) { Vedeu::Toggleable }
22
- let(:described_included) { Vedeu::ToggleableTestClass }
23
- let(:instance) { described_included.new(visible) }
24
+ let(:included_described) { Vedeu::ToggleableTestClass }
25
+ let(:included_instance) { included_described.new(visible) }
24
26
  let(:visible) { false }
25
27
 
26
28
  describe '#visible' do
27
- it { instance.must_respond_to(:visible) }
29
+ it { included_instance.must_respond_to(:visible) }
28
30
  end
29
31
 
30
32
  describe '#visible=' do
31
- it { instance.must_respond_to(:visible=) }
33
+ it { included_instance.must_respond_to(:visible=) }
32
34
  end
33
35
 
34
36
  describe '#visible?' do
35
- it { instance.must_respond_to(:visible?) }
37
+ it { included_instance.must_respond_to(:visible?) }
36
38
  end
37
39
 
38
40
  describe '#hide' do
39
- subject { instance.hide }
41
+ subject { included_instance.hide }
40
42
 
41
43
  it do
42
44
  subject
43
- instance.instance_variable_get('@visible').must_equal(false)
45
+ included_instance.instance_variable_get('@visible').must_equal(false)
44
46
  end
45
47
 
46
- it { Vedeu::ToggleableTestClass.must_respond_to(:hide_cursor) }
47
- it { Vedeu::ToggleableTestClass.must_respond_to(:hide_group) }
48
- it { Vedeu::ToggleableTestClass.must_respond_to(:hide_interface) }
48
+ it { included_described.must_respond_to(:hide_cursor) }
49
+ it { included_described.must_respond_to(:hide_group) }
50
+ it { included_described.must_respond_to(:hide_interface) }
49
51
  end
50
52
 
51
53
  describe '#show' do
52
- subject { instance.show }
54
+ subject { included_instance.show }
53
55
 
54
56
  it do
55
57
  subject
56
- instance.instance_variable_get('@visible').must_equal(true)
58
+ included_instance.instance_variable_get('@visible').must_equal(true)
57
59
  end
58
60
 
59
- it { Vedeu::ToggleableTestClass.must_respond_to(:show_cursor) }
60
- it { Vedeu::ToggleableTestClass.must_respond_to(:show_group) }
61
- it { Vedeu::ToggleableTestClass.must_respond_to(:show_interface) }
61
+ it { included_described.must_respond_to(:show_cursor) }
62
+ it { included_described.must_respond_to(:show_group) }
63
+ it { included_described.must_respond_to(:show_interface) }
62
64
  end
63
65
 
64
66
  describe '#toggle' do
65
- subject { instance.toggle }
67
+ subject { included_instance.toggle }
66
68
 
67
- it { Vedeu::ToggleableTestClass.must_respond_to(:toggle_cursor) }
68
- it { Vedeu::ToggleableTestClass.must_respond_to(:toggle_group) }
69
- it { Vedeu::ToggleableTestClass.must_respond_to(:toggle_interface) }
69
+ it { included_described.must_respond_to(:toggle_cursor) }
70
+ it { included_described.must_respond_to(:toggle_group) }
71
+ it { included_described.must_respond_to(:toggle_interface) }
70
72
 
71
73
  context 'when the model is visible' do
72
74
  let(:visible) { true }
73
75
 
74
76
  it do
75
77
  subject
76
- instance.instance_variable_get('@visible').must_equal(false)
78
+ included_instance.instance_variable_get('@visible').must_equal(false)
77
79
  end
78
80
  end
79
81
 
80
82
  context 'when the model is not visible' do
81
83
  it do
82
84
  subject
83
- instance.instance_variable_get('@visible').must_equal(true)
85
+ included_instance.instance_variable_get('@visible').must_equal(true)
84
86
  end
85
87
  end
86
88
  end
87
89
 
88
90
  describe '.hide_cursor' do
89
- subject { described_included.hide_cursor }
91
+ subject { included_described.hide_cursor }
90
92
 
91
93
  context 'when the cursor is visible' do
92
94
  # @todo Add more tests.
@@ -98,7 +100,7 @@ module Vedeu
98
100
  end
99
101
 
100
102
  describe '.show_cursor' do
101
- subject { described_included.show_cursor }
103
+ subject { included_described.show_cursor }
102
104
 
103
105
  context 'when the cursor is visible' do
104
106
  # @todo Add more tests.
@@ -110,7 +112,7 @@ module Vedeu
110
112
  end
111
113
 
112
114
  describe '.toggle_cursor' do
113
- subject { described_included.toggle_cursor }
115
+ subject { included_described.toggle_cursor }
114
116
 
115
117
  context 'when the cursor is visible' do
116
118
  # @todo Add more tests.