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
@@ -1,176 +1,180 @@
1
1
  module Vedeu
2
2
 
3
- # Wrap or prune text.
4
- #
5
- class Wordwrap
3
+ module Output
6
4
 
7
- # @see Vedeu::Wordwrap#initialize
8
- def self.for(text, options = {})
9
- new(text, options).content
10
- end
11
-
12
- # Returns a new instance of Vedeu::Wordwrap.
5
+ # Wrap or prune text.
13
6
  #
14
- # @param text [String]
15
- # @param options [Hash]
16
- # @option options ellipsis [String] See {#ellipsis}.
17
- # @option options mode [Symbol] See {#mode}.
18
- # @option options width [Fixnum] See {#width}.
19
- # @return [Vedeu::Wordwrap]
20
- def initialize(text, options = {})
21
- @text = text
22
- @options = defaults.merge!(options)
23
- end
24
-
25
- # @return [Vedeu::Views::Lines]
26
- def content
27
- case mode
28
- when :prune then to_line_objects(prune)
29
- when :wrap then to_line_objects(wrap)
30
- else
31
- to_line_objects(split_lines)
32
- end
33
- end
7
+ class Wordwrap
34
8
 
35
- # @return [Array<String>|String]
36
- def prune
37
- return text if text.size <= pruned_width
9
+ # @see Vedeu::Output::Wordwrap#initialize
10
+ def self.for(text, options = {})
11
+ new(text, options).content
12
+ end
38
13
 
39
- processed = []
14
+ # Returns a new instance of Vedeu::Output::Wordwrap.
15
+ #
16
+ # @param text [String]
17
+ # @param options [Hash]
18
+ # @option options ellipsis [String] See {#ellipsis}.
19
+ # @option options mode [Symbol] See {#mode}.
20
+ # @option options width [Fixnum] See {#width}.
21
+ # @return [Vedeu::Output::Wordwrap]
22
+ def initialize(text, options = {})
23
+ @text = text
24
+ @options = defaults.merge!(options)
25
+ end
40
26
 
41
- if split_lines.size > 1
42
- processed = split_lines.reduce([]) do |acc, line|
43
- acc << ellipsis_string(line)
27
+ # @return [Vedeu::Views::Lines]
28
+ def content
29
+ case mode
30
+ when :prune then to_line_objects(prune)
31
+ when :wrap then to_line_objects(wrap)
32
+ else
33
+ to_line_objects(split_lines)
44
34
  end
35
+ end
36
+
37
+ # @return [Array<String>|String]
38
+ def prune
39
+ return text if text.size <= pruned_width
40
+
41
+ processed = []
42
+
43
+ if split_lines.size > 1
44
+ processed = split_lines.reduce([]) do |acc, line|
45
+ acc << ellipsis_string(line)
46
+ end
47
+
48
+ else
49
+ processed = ellipsis_string(text)
45
50
 
46
- else
47
- processed = ellipsis_string(text)
51
+ end
48
52
 
53
+ processed
49
54
  end
50
55
 
51
- processed
52
- end
56
+ # @return [String]
57
+ def wrap
58
+ processed = []
59
+ split_lines.map do |unprocessed|
60
+ line_length = 0
61
+ reformatted = []
53
62
 
54
- # @return [String]
55
- def wrap
56
- processed = []
57
- split_lines.map do |unprocessed|
58
- line_length = 0
59
- reformatted = []
63
+ unprocessed.split(/\s/).map do |word|
64
+ word_length = word.length + 1
60
65
 
61
- unprocessed.split(/\s/).map do |word|
62
- word_length = word.length + 1
66
+ if (line_length += word_length) >= width
67
+ line_length = word_length
68
+ processed << reformatted
69
+ reformatted = []
70
+ end
63
71
 
64
- if (line_length += word_length) >= width
65
- line_length = word_length
66
- processed << reformatted
67
- reformatted = []
72
+ reformatted << word
68
73
  end
69
74
 
70
- reformatted << word
75
+ processed << reformatted
71
76
  end
72
77
 
73
- processed << reformatted
78
+ processed.reduce([]) do |output, line|
79
+ output << line.join(' ')
80
+ end
74
81
  end
75
82
 
76
- processed.reduce([]) do |output, line|
77
- output << line.join(' ')
78
- end
79
- end
83
+ protected
80
84
 
81
- protected
85
+ # @!attribute [r] text
86
+ # @return [String]
87
+ attr_reader :text
82
88
 
83
- # @!attribute [r] text
84
- # @return [String]
85
- attr_reader :text
89
+ # @!attribute [r] options
90
+ # @return [Hash]
91
+ attr_reader :options
86
92
 
87
- # @!attribute [r] options
88
- # @return [Hash]
89
- attr_reader :options
93
+ private
90
94
 
91
- private
95
+ # @param text_as_lines [Array<String>]
96
+ # @return [Vedeu::Views::Lines]
97
+ def to_line_objects(text_as_lines)
98
+ line_objects = Array(text_as_lines).map do |text_line|
99
+ stream = Vedeu::Views::Stream.new(value: text_line)
100
+ line = Vedeu::Views::Line.new
101
+ stream.parent = line
102
+ line.add(stream)
103
+ line
104
+ end
105
+ Vedeu::Views::Lines.new(line_objects)
106
+ end
92
107
 
93
- # @param text_as_lines [Array<String>]
94
- # @return [Vedeu::Views::Lines]
95
- def to_line_objects(text_as_lines)
96
- line_objects = Array(text_as_lines).map do |text_line|
97
- stream = Vedeu::Views::Stream.new(value: text_line)
98
- line = Vedeu::Views::Line.new
99
- stream.parent = line
100
- line.add(stream)
101
- line
108
+ # Returns the text as an array of lines, split on '\n'.
109
+ #
110
+ # @return [Array<String>]
111
+ def split_lines
112
+ text.split(/\n/)
102
113
  end
103
- Vedeu::Views::Lines.new(line_objects)
104
- end
105
114
 
106
- # Returns the text as an array of lines, split on '\n'.
107
- #
108
- # @return [Array<String>]
109
- def split_lines
110
- text.split(/\n/)
111
- end
115
+ # @param string [String]
116
+ # @return [String]
117
+ def ellipsis_string(string)
118
+ if string.size < ellipsis.size
119
+ prune_string(string)
112
120
 
113
- # @param string [String]
114
- # @return [String]
115
- def ellipsis_string(string)
116
- if string.size < ellipsis.size
117
- prune_string(string)
121
+ else
122
+ "#{prune_string(string)}#{ellipsis}"
118
123
 
119
- else
120
- "#{prune_string(string)}#{ellipsis}"
124
+ end
125
+ end
121
126
 
127
+ # Returns the string pruned.
128
+ #
129
+ # @param string [String]
130
+ # @return [String]
131
+ def prune_string(string)
132
+ string.chomp.slice(0..pruned_width)
122
133
  end
123
- end
124
134
 
125
- # Returns the string pruned.
126
- #
127
- # @param string [String]
128
- # @return [String]
129
- def prune_string(string)
130
- string.chomp.slice(0..pruned_width)
131
- end
135
+ # Returns the width of the string minus the ellipsis.
136
+ #
137
+ # @return [Fixnum]
138
+ def pruned_width
139
+ width - ellipsis.size
140
+ end
132
141
 
133
- # Returns the width of the string minus the ellipsis.
134
- #
135
- # @return [Fixnum]
136
- def pruned_width
137
- width - ellipsis.size
138
- end
142
+ # For when using mode `:prune`, by default, provides '...'.
143
+ #
144
+ # @return [String]
145
+ def ellipsis
146
+ options.fetch(:ellipsis)
147
+ end
139
148
 
140
- # For when using mode `:prune`, by default, provides '...'.
141
- #
142
- # @return [String]
143
- def ellipsis
144
- options.fetch(:ellipsis)
145
- end
146
-
147
- # Returns the word wrapping mode. One of :default, :prune or :wrap;
148
- # :default = Renders the content as is.
149
- # :prune = Discards the remainder of the content line after width.
150
- # :wrap = Forces the content on to a new line after width.
151
- # @return [Symbol]
152
- def mode
153
- options.fetch(:mode)
154
- end
155
-
156
- # Returns the width to prune or wrap to.
157
- #
158
- # @return [Fixnum]
159
- def width
160
- options.fetch(:width)
161
- end
149
+ # Returns the word wrapping mode. One of :default, :prune or :wrap;
150
+ # :default = Renders the content as is.
151
+ # :prune = Discards the remainder of the content line after width.
152
+ # :wrap = Forces the content on to a new line after width.
153
+ # @return [Symbol]
154
+ def mode
155
+ options.fetch(:mode)
156
+ end
162
157
 
163
- # Returns the default options/attributes for this class.
164
- #
165
- # @return [Hash<Symbol => Fixnum, String, Symbol>]
166
- def defaults
167
- {
168
- ellipsis: '...',
169
- mode: :default,
170
- width: 70,
171
- }
172
- end
173
-
174
- end # Wordwrap
158
+ # Returns the width to prune or wrap to.
159
+ #
160
+ # @return [Fixnum]
161
+ def width
162
+ options.fetch(:width)
163
+ end
164
+
165
+ # Returns the default options/attributes for this class.
166
+ #
167
+ # @return [Hash<Symbol => Fixnum, String, Symbol>]
168
+ def defaults
169
+ {
170
+ ellipsis: '...',
171
+ mode: :default,
172
+ width: 70,
173
+ }
174
+ end
175
+
176
+ end # Wordwrap
177
+
178
+ end # Output
175
179
 
176
180
  end # Vedeu
@@ -5,7 +5,7 @@ module Vedeu
5
5
 
6
6
  # Refresh all registered interfaces.
7
7
  #
8
- # @return [Array<Vedeu::Interface>]
8
+ # @return [Array<Vedeu::Models::Interface>]
9
9
  def self.all
10
10
  new.all
11
11
  end
@@ -17,7 +17,7 @@ module Vedeu
17
17
 
18
18
  # Refresh all registered interfaces.
19
19
  #
20
- # @return [Array<Vedeu::Interface>]
20
+ # @return [Array<Vedeu::Models::Interface>]
21
21
  def all
22
22
  Vedeu.timer('Refreshing all') do
23
23
  Vedeu.interfaces.zindexed.each do |interface|
@@ -9,18 +9,22 @@ module Vedeu
9
9
  # @param value [String] The HTML/CSS colour.
10
10
  # @param block [Proc]
11
11
  # @return [Vedeu::Views::Stream]
12
- # @raise [Vedeu::Error::InvalidSyntax] The required block was not given.
12
+ # @raise [Vedeu::Error::InvalidSyntax] The required block was
13
+ # not given.
13
14
  def background(value, &block)
14
15
  define_stream(background: value, &block)
15
16
  end
16
17
  alias_method :bg, :background
17
18
 
18
19
  # @param attributes [Hash]
19
- # @option attributes foreground [String] The HTML/CSS foreground colour.
20
- # @option attributes background [String] The HTML/CSS background colour.
20
+ # @option attributes foreground [String] The HTML/CSS foreground
21
+ # colour.
22
+ # @option attributes background [String] The HTML/CSS background
23
+ # colour.
21
24
  # @param block [Proc]
22
25
  # @return [Vedeu::Views::Stream]
23
- # @raise [Vedeu::Error::InvalidSyntax] The required block was not given.
26
+ # @raise [Vedeu::Error::InvalidSyntax] The required block was
27
+ # not given.
24
28
  def colour(attributes = {}, &block)
25
29
  define_stream(attributes, &block)
26
30
  end
@@ -28,7 +32,8 @@ module Vedeu
28
32
  # @param value [String] The HTML/CSS colour.
29
33
  # @param block [Proc]
30
34
  # @return [Vedeu::Views::Stream]
31
- # @raise [Vedeu::Error::InvalidSyntax] The required block was not given.
35
+ # @raise [Vedeu::Error::InvalidSyntax] The required block was
36
+ # not given.
32
37
  def foreground(value, &block)
33
38
  define_stream(foreground: value, &block)
34
39
  end
@@ -50,7 +55,7 @@ module Vedeu
50
55
  encode(
51
56
  Vedeu::Views::Stream.build(
52
57
  colour: Vedeu::Colours::Colour.new(attributes),
53
- style: Vedeu::Style.new(attributes[:style]),
58
+ style: Vedeu::Presentation::Style.new(attributes[:style]),
54
59
  value: block.call))
55
60
  end
56
61
 
@@ -81,7 +81,7 @@ module Vedeu
81
81
 
82
82
  # Fetch the interface by name.
83
83
  #
84
- # @return [Vedeu::Interface]
84
+ # @return [Vedeu::Models::Interface]
85
85
  def interface
86
86
  Vedeu.interfaces.by_name(options[:name])
87
87
  end
@@ -207,9 +207,9 @@ module Vedeu
207
207
  IO.console
208
208
  end
209
209
 
210
- # @return [Vedeu::VirtualBuffer]
210
+ # @return [Vedeu::Buffers::VirtualBuffer]
211
211
  def virtual
212
- @virtual ||= Vedeu::VirtualBuffer.new(height, width)
212
+ @virtual ||= Vedeu::Buffers::VirtualBuffer.new(height, width)
213
213
  end
214
214
 
215
215
  end # Terminal
data/lib/vedeu/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Vedeu
2
2
 
3
3
  # The current version of Vedeu.
4
- VERSION = '0.6.8'
4
+ VERSION = '0.6.9'
5
5
 
6
6
  end
@@ -40,7 +40,7 @@ module Vedeu
40
40
  Vedeu::Geometry::Geometry.new(name: _name, x: 1, xn: 7, y: 1, yn: 4)
41
41
  }
42
42
  let(:interface) {
43
- Vedeu::Interface.new(name: _name, visible: visible)
43
+ Vedeu::Models::Interface.new(name: _name, visible: visible)
44
44
  }
45
45
  before do
46
46
  Vedeu.geometries.stubs(:by_name).returns(geometry)
@@ -8,6 +8,11 @@ module Vedeu
8
8
 
9
9
  let(:described) { Vedeu::Buffers::Buffer }
10
10
  let(:instance) { described.new(attributes) }
11
+ let(:_name) { 'krypton' }
12
+ let(:back) {}
13
+ let(:front) {}
14
+ let(:previous) {}
15
+ let(:interface) {}
11
16
  let(:attributes) {
12
17
  {
13
18
  name: _name,
@@ -16,11 +21,6 @@ module Vedeu
16
21
  previous: previous,
17
22
  }
18
23
  }
19
- let(:_name) { 'krypton' }
20
- let(:back) {}
21
- let(:front) {}
22
- let(:previous) {}
23
- let(:interface) {}
24
24
 
25
25
  describe '#initialize' do
26
26
  it { instance.must_be_instance_of(described) }
@@ -44,7 +44,9 @@ module Vedeu
44
44
  end
45
45
 
46
46
  describe '#add' do
47
- let(:content) { Vedeu::Views::View.new(value: [Vedeu::Views::Line.new]) }
47
+ let(:content) {
48
+ Vedeu::Views::View.new(value: [Vedeu::Views::Line.new])
49
+ }
48
50
 
49
51
  subject { instance.add(content) }
50
52
 
@@ -72,7 +74,7 @@ module Vedeu
72
74
 
73
75
  before do
74
76
  Vedeu::Clear::NamedInterface.stubs(:render).returns(emptiness)
75
- Vedeu::Output.stubs(:render).returns(emptiness)
77
+ Vedeu::Output::Output.stubs(:render).returns(emptiness)
76
78
  end
77
79
 
78
80
  subject { instance.clear }
@@ -80,7 +82,7 @@ module Vedeu
80
82
  it {
81
83
  Vedeu::Clear::NamedInterface.expects(:render).with(_name).
82
84
  returns(emptiness)
83
- Vedeu::Output.expects(:render).with(emptiness)
85
+ Vedeu::Output::Output.expects(:render).with(emptiness)
84
86
  subject
85
87
  }
86
88
  end
@@ -118,34 +120,34 @@ module Vedeu
118
120
  end
119
121
 
120
122
  describe '#hide' do
121
- before { Vedeu::Output.stubs(:render) }
123
+ before { Vedeu::Output::Output.stubs(:render) }
122
124
 
123
125
  subject { instance.hide }
124
126
 
125
127
  it {
126
- Vedeu::Output.expects(:render)
128
+ Vedeu::Output::Output.expects(:render)
127
129
  subject
128
130
  }
129
131
  end
130
132
 
131
133
  describe '#show' do
132
- before { Vedeu::Output.stubs(:render) }
134
+ before { Vedeu::Output::Output.stubs(:render) }
133
135
 
134
136
  subject { instance.show }
135
137
 
136
138
  it {
137
- Vedeu::Output.expects(:render)
139
+ Vedeu::Output::Output.expects(:render)
138
140
  subject
139
141
  }
140
142
  end
141
143
 
142
144
  describe '#render' do
143
- before { Vedeu::Output.stubs(:render) }
145
+ before { Vedeu::Output::Output.stubs(:render) }
144
146
 
145
147
  subject { instance.render }
146
148
 
147
149
  it {
148
- Vedeu::Output.expects(:render)
150
+ Vedeu::Output::Output.expects(:render)
149
151
  subject
150
152
  }
151
153
  end