vedeu 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -2
  3. data/.travis.yml +1 -1
  4. data/README.md +2 -6
  5. data/config/rubocop_enabled.yml +0 -6
  6. data/docs/dsl/by_method/clock_time.md +4 -1
  7. data/lib/vedeu/application/application_controller.rb +2 -2
  8. data/lib/vedeu/application/controller.rb +3 -3
  9. data/lib/vedeu/borders/border.rb +6 -6
  10. data/lib/vedeu/borders/dsl.rb +26 -26
  11. data/lib/vedeu/borders/refresh.rb +2 -2
  12. data/lib/vedeu/borders/title.rb +4 -4
  13. data/lib/vedeu/buffers/refresh.rb +8 -7
  14. data/lib/vedeu/buffers/terminal.rb +1 -1
  15. data/lib/vedeu/buffers/view.rb +2 -2
  16. data/lib/vedeu/cells/clear.rb +1 -1
  17. data/lib/vedeu/cells/cursor.rb +6 -6
  18. data/lib/vedeu/cells/empty.rb +2 -2
  19. data/lib/vedeu/cells/escape.rb +6 -6
  20. data/lib/vedeu/coercers/alignment.rb +1 -1
  21. data/lib/vedeu/coercers/colour_attributes.rb +8 -16
  22. data/lib/vedeu/colours/background.rb +4 -8
  23. data/lib/vedeu/colours/colour.rb +4 -4
  24. data/lib/vedeu/colours/foreground.rb +4 -8
  25. data/lib/vedeu/colours/repository.rb +1 -1
  26. data/lib/vedeu/colours/translator.rb +6 -6
  27. data/lib/vedeu/common.rb +1 -1
  28. data/lib/vedeu/configuration/api.rb +15 -15
  29. data/lib/vedeu/configuration/configuration.rb +8 -8
  30. data/lib/vedeu/cursors/coordinate.rb +4 -4
  31. data/lib/vedeu/cursors/cursor.rb +2 -2
  32. data/lib/vedeu/distributed/client.rb +2 -2
  33. data/lib/vedeu/distributed/server.rb +8 -10
  34. data/lib/vedeu/distributed/subprocess.rb +1 -1
  35. data/lib/vedeu/distributed/uri.rb +1 -1
  36. data/lib/vedeu/dsl/cursors.rb +2 -2
  37. data/lib/vedeu/dsl/elements.rb +5 -5
  38. data/lib/vedeu/dsl/helpers/align.rb +1 -1
  39. data/lib/vedeu/dsl/helpers/attributes.rb +1 -1
  40. data/lib/vedeu/dsl/presentation.rb +15 -15
  41. data/lib/vedeu/dsl/view.rb +1 -1
  42. data/lib/vedeu/dsl/views.rb +1 -1
  43. data/lib/vedeu/editor/cursor.rb +1 -1
  44. data/lib/vedeu/editor/line.rb +2 -2
  45. data/lib/vedeu/editor/lines.rb +2 -2
  46. data/lib/vedeu/esc/borders.rb +19 -19
  47. data/lib/vedeu/esc/colours.rb +1 -1
  48. data/lib/vedeu/events/aliases.rb +3 -15
  49. data/lib/vedeu/events/event.rb +14 -14
  50. data/lib/vedeu/events/repository.rb +1 -1
  51. data/lib/vedeu/geometries/area/area.rb +5 -5
  52. data/lib/vedeu/geometries/area/dimension.rb +1 -1
  53. data/lib/vedeu/geometries/dsl/dsl.rb +7 -7
  54. data/lib/vedeu/geometries/geometry.rb +2 -2
  55. data/lib/vedeu/geometries/position.rb +6 -6
  56. data/lib/vedeu/groups/clear.rb +2 -2
  57. data/lib/vedeu/groups/group.rb +2 -2
  58. data/lib/vedeu/input/dsl.rb +1 -1
  59. data/lib/vedeu/input/key.rb +3 -3
  60. data/lib/vedeu/input/mapper.rb +2 -2
  61. data/lib/vedeu/input/read.rb +2 -4
  62. data/lib/vedeu/input/store.rb +1 -17
  63. data/lib/vedeu/input/translator.rb +49 -45
  64. data/lib/vedeu/interfaces/clear.rb +3 -3
  65. data/lib/vedeu/interfaces/dsl.rb +4 -4
  66. data/lib/vedeu/interfaces/interface.rb +2 -2
  67. data/lib/vedeu/logging/clock_time.rb +3 -3
  68. data/lib/vedeu/logging/debug.rb +14 -6
  69. data/lib/vedeu/logging/log.rb +1 -1
  70. data/lib/vedeu/menus/dsl.rb +2 -2
  71. data/lib/vedeu/menus/menu.rb +9 -9
  72. data/lib/vedeu/models/focus.rb +11 -11
  73. data/lib/vedeu/models/page.rb +1 -1
  74. data/lib/vedeu/models/row.rb +1 -1
  75. data/lib/vedeu/models/toggleable.rb +7 -7
  76. data/lib/vedeu/null/generic.rb +29 -29
  77. data/lib/vedeu/output/compressor_cache.rb +1 -11
  78. data/lib/vedeu/output/viewport.rb +4 -12
  79. data/lib/vedeu/output/write.rb +3 -3
  80. data/lib/vedeu/plugins/plugin.rb +1 -1
  81. data/lib/vedeu/presentation/colour.rb +1 -1
  82. data/lib/vedeu/presentation/presentation.rb +1 -1
  83. data/lib/vedeu/presentation/style.rb +4 -4
  84. data/lib/vedeu/renderers/all.rb +1 -14
  85. data/lib/vedeu/renderers/options.rb +1 -1
  86. data/lib/vedeu/repositories/all.rb +1 -0
  87. data/lib/vedeu/repositories/assemblage.rb +1 -1
  88. data/lib/vedeu/repositories/collection.rb +4 -4
  89. data/lib/vedeu/repositories/registerable.rb +2 -2
  90. data/lib/vedeu/repositories/repositories.rb +1 -1
  91. data/lib/vedeu/repositories/repository.rb +3 -3
  92. data/lib/vedeu/repositories/storage.rb +38 -0
  93. data/lib/vedeu/repositories/store.rb +5 -22
  94. data/lib/vedeu/runtime/application.rb +1 -1
  95. data/lib/vedeu/runtime/flags.rb +3 -3
  96. data/lib/vedeu/runtime/router.rb +3 -18
  97. data/lib/vedeu/templating/helpers.rb +5 -3
  98. data/lib/vedeu/templating/view_template.rb +26 -18
  99. data/lib/vedeu/terminal/terminal.rb +5 -5
  100. data/lib/vedeu/version.rb +1 -1
  101. data/lib/vedeu/views/chars.rb +1 -1
  102. data/lib/vedeu/views/composition.rb +4 -4
  103. data/lib/vedeu/views/default_attributes.rb +2 -2
  104. data/lib/vedeu/views/line.rb +6 -6
  105. data/lib/vedeu/views/lines.rb +1 -1
  106. data/lib/vedeu/views/stream.rb +6 -6
  107. data/lib/vedeu/views/streams.rb +1 -1
  108. data/lib/vedeu/views/view.rb +4 -4
  109. data/test/lib/vedeu/borders/border_test.rb +1 -1
  110. data/test/lib/vedeu/borders/caption_test.rb +1 -1
  111. data/test/lib/vedeu/borders/dsl_test.rb +2 -3
  112. data/test/lib/vedeu/borders/refresh_test.rb +1 -1
  113. data/test/lib/vedeu/borders/title_test.rb +1 -1
  114. data/test/lib/vedeu/buffers/buffer_test.rb +7 -7
  115. data/test/lib/vedeu/buffers/refresh_test.rb +1 -1
  116. data/test/lib/vedeu/colours/background_test.rb +27 -0
  117. data/test/lib/vedeu/colours/foreground_test.rb +27 -0
  118. data/test/lib/vedeu/cursors/cursor_test.rb +3 -3
  119. data/test/lib/vedeu/cursors/move_test.rb +1 -1
  120. data/test/lib/vedeu/cursors/refresh_test.rb +1 -1
  121. data/test/lib/vedeu/cursors/reposition_test.rb +2 -2
  122. data/test/lib/vedeu/dsl/view_test.rb +6 -8
  123. data/test/lib/vedeu/editor/cropper_test.rb +1 -1
  124. data/test/lib/vedeu/editor/cursor_test.rb +1 -1
  125. data/test/lib/vedeu/editor/document_test.rb +1 -1
  126. data/test/lib/vedeu/editor/editor_test.rb +1 -1
  127. data/test/lib/vedeu/events/aliases_test.rb +0 -14
  128. data/test/lib/vedeu/geometries/area/area_test.rb +1 -1
  129. data/test/lib/vedeu/geometries/geometry_test.rb +1 -1
  130. data/test/lib/vedeu/geometries/move_test.rb +1 -1
  131. data/test/lib/vedeu/groups/clear_test.rb +1 -1
  132. data/test/lib/vedeu/groups/dsl_test.rb +1 -1
  133. data/test/lib/vedeu/groups/group_test.rb +1 -1
  134. data/test/lib/vedeu/groups/refresh_test.rb +1 -1
  135. data/test/lib/vedeu/input/capture_test.rb +2 -2
  136. data/test/lib/vedeu/input/store_test.rb +0 -34
  137. data/test/lib/vedeu/interfaces/clear_test.rb +1 -1
  138. data/test/lib/vedeu/interfaces/dsl_test.rb +4 -4
  139. data/test/lib/vedeu/interfaces/interface_test.rb +1 -1
  140. data/test/lib/vedeu/menus/dsl_test.rb +1 -1
  141. data/test/lib/vedeu/null/generic_test.rb +1 -1
  142. data/test/lib/vedeu/output/compressor_cache_test.rb +0 -33
  143. data/test/lib/vedeu/renderers/all_test.rb +0 -8
  144. data/test/lib/vedeu/repositories/repository_test.rb +2 -2
  145. data/test/lib/vedeu/repositories/storage_test.rb +74 -0
  146. data/test/lib/vedeu/repositories/store_test.rb +10 -28
  147. data/test/lib/vedeu/runtime/router_test.rb +0 -8
  148. data/test/lib/vedeu/views/default_attributes_test.rb +5 -5
  149. data/test/lib/vedeu/views/view_test.rb +5 -2
  150. data/test/test_helper.rb +1 -1
  151. data/vedeu.gemspec +1 -1
  152. metadata +7 -4
@@ -34,7 +34,7 @@ module Vedeu
34
34
  y: y,
35
35
  }
36
36
  }
37
- let(:_name) { 'silver' }
37
+ let(:_name) { :vedeu_cursors_cursor }
38
38
  let(:ox) { 3 }
39
39
  let(:oy) { 2 }
40
40
  let(:repository) { Vedeu.cursors }
@@ -64,7 +64,7 @@ module Vedeu
64
64
  subject { instance }
65
65
 
66
66
  it { subject.must_be_instance_of(described) }
67
- it { subject.instance_variable_get('@name').must_equal('silver') }
67
+ it { subject.instance_variable_get('@name').must_equal( _name) }
68
68
  it { subject.instance_variable_get('@ox').must_equal(ox) }
69
69
  it { subject.instance_variable_get('@oy').must_equal(oy) }
70
70
  it do
@@ -147,7 +147,7 @@ module Vedeu
147
147
 
148
148
  describe '#inspect' do
149
149
  let(:expected) {
150
- "<Vedeu::Cursors::Cursor name:'silver', x:19, y:8, ox:3, oy:2, " \
150
+ "<Vedeu::Cursors::Cursor name:'vedeu_cursors_cursor', x:19, y:8, ox:3, oy:2, " \
151
151
  "visible:true>"
152
152
  }
153
153
 
@@ -32,7 +32,7 @@ module Vedeu
32
32
  subject { described.move(_name, direction) }
33
33
 
34
34
  context 'when a name is given' do
35
- let(:_name) { 'Vedeu::Cursors::Move' }
35
+ let(:_name) { :vedeu_cursors_move }
36
36
 
37
37
  before do
38
38
  Vedeu.cursors.stubs(:by_name).returns(cursor)
@@ -14,7 +14,7 @@ module Vedeu
14
14
 
15
15
  let(:described) { Vedeu::Cursors::Refresh }
16
16
  let(:instance) { described.new(_name) }
17
- let(:_name) { 'refresh_cursor' }
17
+ let(:_name) { :vedeu_cursors_refresh }
18
18
  let(:expected) {}
19
19
  let(:cursor) {
20
20
  Vedeu::Cursors::Cursor.store(name: _name,
@@ -11,7 +11,7 @@ module Vedeu
11
11
  let(:described) { Vedeu::Cursors::Reposition }
12
12
  let(:instance) { described.new(attributes) }
13
13
  let(:mode) {}
14
- let(:_name) { :reposition_test }
14
+ let(:_name) { :vedeu_cursors_reposition }
15
15
  let(:x) { 0 }
16
16
  let(:y) { 0 }
17
17
  let(:attributes) {
@@ -24,7 +24,7 @@ module Vedeu
24
24
  }
25
25
 
26
26
  before {
27
- Vedeu.interface :reposition_test do
27
+ Vedeu.interface _name do
28
28
  geometry do
29
29
  x 4
30
30
  y 4
@@ -14,7 +14,7 @@ module Vedeu
14
14
  let(:client) {}
15
15
 
16
16
  describe '#view' do
17
- let(:_name) { :dysprosium }
17
+ let(:_name) { :vedeu_dsl_view }
18
18
 
19
19
  subject {
20
20
  instance.view(_name) do
@@ -47,8 +47,9 @@ module Vedeu
47
47
  end
48
48
 
49
49
  describe '#template_for' do
50
- let(:_name) {}
51
- let(:filename) {}
50
+ let(:_name) { :vedeu_dsl_view }
51
+ let(:filename) { 'my_interface.erb' }
52
+
52
53
  let(:object) {}
53
54
  let(:content) { "Hydrogen\nCarbon\nOxygen\nNitrogen" }
54
55
  let(:options) { {} }
@@ -56,21 +57,18 @@ module Vedeu
56
57
  subject { instance.template_for(_name, filename, object, options) }
57
58
 
58
59
  context 'when the name of the view is not given' do
59
- let(:filename) { 'my_interface.erb' }
60
+ let(:_name) {}
60
61
 
61
62
  it { proc { subject }.must_raise(Vedeu::Error::MissingRequired) }
62
63
  end
63
64
 
64
65
  context 'when the filename of the template is not given' do
65
- let(:_name) { 'my_interface' }
66
+ let(:filename) {}
66
67
 
67
68
  it { proc { subject }.must_raise(Vedeu::Error::MissingRequired) }
68
69
  end
69
70
 
70
71
  context 'when the name and filename are given' do
71
- let(:_name) { 'my_interface' }
72
- let(:filename) { 'my_interface.erb' }
73
-
74
72
  before do
75
73
  Vedeu::Templating::ViewTemplate.expects(:parse).
76
74
  with(object, filename, options).returns(content)
@@ -12,7 +12,7 @@ module Vedeu
12
12
  let(:instance) {
13
13
  described.new(lines: lines, name: _name, ox: ox, oy: oy)
14
14
  }
15
- let(:_name) { 'editor_cropper' }
15
+ let(:_name) { :vedeu_editor_cropper }
16
16
  let(:lines) { Vedeu::Editor::Lines.new }
17
17
  let(:ox) { 1 }
18
18
  let(:oy) { 1 }
@@ -19,7 +19,7 @@ module Vedeu
19
19
  y: y,
20
20
  }
21
21
  }
22
- let(:_name) { 'editor_cursor' }
22
+ let(:_name) { :vedeu_editor_cursor }
23
23
  let(:ox) { 0 }
24
24
  let(:oy) { 0 }
25
25
  let(:x) { 0 }
@@ -21,7 +21,7 @@ module Vedeu
21
21
  "Helium\n" \
22
22
  "Lithium\n"
23
23
  }
24
- let(:_name) { 'Vedeu::Editor::Document' }
24
+ let(:_name) { :vedeu_editor_document }
25
25
  let(:border) {
26
26
  Vedeu::Borders::Border.new({ name: _name, enabled: false })
27
27
  }
@@ -17,7 +17,7 @@ module Vedeu
17
17
  described.new(input: input, name: _name)
18
18
  }
19
19
  let(:input) {}
20
- let(:_name) { 'Vedeu::Editor::Editor' }
20
+ let(:_name) { :vedeu_editor_editor }
21
21
  let(:document) { Vedeu::Editor::Document.new(data: data, name: _name) }
22
22
  let(:data) {
23
23
  "Hydrogen\n" \
@@ -90,20 +90,6 @@ module Vedeu
90
90
  end
91
91
  end
92
92
 
93
- describe '.reset!' do
94
- subject { described.reset! }
95
-
96
- it { described.must_respond_to(:reset) }
97
-
98
- it { subject.must_equal({}) }
99
- end
100
-
101
- describe '.storage' do
102
- subject { described.storage }
103
-
104
- it { subject.must_equal({}) }
105
- end
106
-
107
93
  describe '.trigger' do
108
94
  let(:alias_name) { :some_alias }
109
95
  let(:args) {}
@@ -10,7 +10,7 @@ module Vedeu
10
10
 
11
11
  let(:described) { Vedeu::Geometries::Area }
12
12
  let(:instance) { described.new(name: _name, y: y, yn: yn, x: x, xn: xn) }
13
- let(:_name) { 'Vedeu::Geometries::Area' }
13
+ let(:_name) { :vedeu_geometries_area }
14
14
  let(:y) { 4 }
15
15
  let(:yn) { 9 }
16
16
  let(:x) { 6 }
@@ -30,7 +30,7 @@ module Vedeu
30
30
  let(:height) {}
31
31
  let(:horizontal_alignment) {}
32
32
  let(:maximised) { false }
33
- let(:_name) { 'vedeu_geometry_geometry' }
33
+ let(:_name) { :vedeu_geometries_geometry }
34
34
  let(:vertical_alignment) {}
35
35
  let(:width) {}
36
36
  let(:x) {}
@@ -11,7 +11,7 @@ module Vedeu
11
11
  let(:described) { Vedeu::Geometries::Move }
12
12
  let(:instance) { described.new(attributes) }
13
13
  let(:direction) {}
14
- let(:_name) { 'Vedeu::Geometries::Move' }
14
+ let(:_name) { :vedeu_geometries_move }
15
15
  let(:offset) {}
16
16
  let(:attributes) {
17
17
  {
@@ -14,7 +14,7 @@ module Vedeu
14
14
 
15
15
  let(:described) { Vedeu::Groups::Clear }
16
16
  let(:instance) { described.new(_name) }
17
- let(:_name) { 'Vedeu::Groups::Clear' }
17
+ let(:_name) { :vedeu_groups_clear }
18
18
 
19
19
  describe '#initialize' do
20
20
  it { instance.must_be_instance_of(described) }
@@ -12,7 +12,7 @@ module Vedeu
12
12
  let(:instance) { described.new(model, client) }
13
13
  let(:model) { Vedeu::Groups::Group.new }
14
14
  let(:client) {}
15
- let(:_name) { :main_screen }
15
+ let(:_name) { :vedeu_groups_dsl }
16
16
 
17
17
  describe '.group' do
18
18
  subject {
@@ -24,7 +24,7 @@ module Vedeu
24
24
  visible: visible,
25
25
  }
26
26
  }
27
- let(:_name) { 'organics' }
27
+ let(:_name) { :vedeu_groups_group }
28
28
  let(:members) { Set.new(['carbon', 'nitrogen', 'oxygen']) }
29
29
  let(:repository) { Vedeu.groups }
30
30
  let(:visible) { true }
@@ -14,7 +14,7 @@ module Vedeu
14
14
 
15
15
  let(:described) { Vedeu::Groups::Refresh }
16
16
  let(:instance) { described.new(_name) }
17
- let(:_name) { 'Vedeu::Groups::Refresh' }
17
+ let(:_name) { :vedeu_groups_refresh }
18
18
 
19
19
  describe '#initialize' do
20
20
  it { instance.must_be_instance_of(described) }
@@ -24,7 +24,7 @@ module Vedeu
24
24
  let(:is_fake_mode) { false }
25
25
  let(:is_raw_mode) { false }
26
26
  let(:keypress) {}
27
- let(:_name) { 'Vedeu::Input::Capture' }
27
+ let(:_name) { :vedeu_input_capture }
28
28
  let(:interface) {
29
29
  Vedeu::Interfaces::Interface.new(editable: editable,
30
30
  name: _name)
@@ -72,7 +72,7 @@ module Vedeu
72
72
 
73
73
  it do
74
74
  Vedeu.expects(:trigger).
75
- with(:_keypress_, translated, 'Vedeu::Input::Capture')
75
+ with(:_keypress_, translated, _name)
76
76
  subject
77
77
  end
78
78
  end
@@ -100,40 +100,6 @@ module Vedeu
100
100
  end
101
101
  end
102
102
 
103
- describe '#reset' do
104
- subject { described.reset! }
105
-
106
- it { subject.must_equal({ commands: [], keypresses: [] }) }
107
- end
108
-
109
- describe '#storage' do
110
- subject { described.storage }
111
-
112
- it { described.must_respond_to(:all) }
113
-
114
- context 'when empty' do
115
- it { subject.must_equal({ commands: [], keypresses: [] }) }
116
- end
117
-
118
- context 'when not empty' do
119
- let(:expected) {
120
- {
121
- commands: ['command_1', 'command_2'],
122
- keypresses: ['a', 'b'],
123
- }
124
- }
125
-
126
- before do
127
- described.add_command('command_1')
128
- described.add_command('command_2')
129
- described.add_keypress('a')
130
- described.add_keypress('b')
131
- end
132
-
133
- it { subject.must_equal(expected) }
134
- end
135
- end
136
-
137
103
  end # Store
138
104
 
139
105
  end # Input
@@ -21,7 +21,7 @@ module Vedeu
21
21
  direct: false,
22
22
  }
23
23
  }
24
- let(:_name) { 'Vedeu::Interfaces::Clear' }
24
+ let(:_name) { :vedeu_interfaces_clear }
25
25
 
26
26
  describe '#initialize' do
27
27
  it { instance.must_be_instance_of(described) }
@@ -13,7 +13,7 @@ module Vedeu
13
13
  let(:model) {
14
14
  Vedeu::Interfaces::Interface.new(name: _name)
15
15
  }
16
- let(:_name) { 'actinium' }
16
+ let(:_name) { :vedeu_interfaces_dsl }
17
17
  let(:client) {}
18
18
 
19
19
  describe '.interface' do
@@ -91,7 +91,7 @@ module Vedeu
91
91
  context 'when the interface has a name' do
92
92
  before { Vedeu::Models::Focus.reset }
93
93
 
94
- it { subject.must_equal(['actinium']) }
94
+ it { subject.must_equal([_name]) }
95
95
  end
96
96
  end
97
97
 
@@ -111,7 +111,7 @@ module Vedeu
111
111
  end
112
112
 
113
113
  context 'when the named group exists' do
114
- let(:members) { Set['actinium', 'lanthanum'] }
114
+ let(:members) { Set[_name, 'lanthanum'] }
115
115
 
116
116
  before do
117
117
  Vedeu::Groups::Group.new(name: 'elements',
@@ -127,7 +127,7 @@ module Vedeu
127
127
  context 'when the named group does not exist' do
128
128
  it do
129
129
  subject
130
- Vedeu.groups.find('elements').members.must_equal(Set['actinium'])
130
+ Vedeu.groups.find('elements').members.must_equal(Set[_name])
131
131
  end
132
132
  end
133
133
  end
@@ -31,7 +31,7 @@ module Vedeu
31
31
  let(:delay) { 0.0 }
32
32
  let(:editable) { false }
33
33
  let(:group) { '' }
34
- let(:_name) { 'hydrogen' }
34
+ let(:_name) { :vedeu_interfaces_interface }
35
35
  let(:parent) {}
36
36
  let(:repository) { Vedeu.interfaces }
37
37
  let(:style) {}
@@ -11,7 +11,7 @@ module Vedeu
11
11
  let(:described) { Vedeu::Menus::DSL }
12
12
  let(:instance) { described.new(model) }
13
13
  let(:model) { Vedeu::Menus::Menu.new(attributes) }
14
- let(:_name) { 'elements' }
14
+ let(:_name) { :vedeu_menus_dsl }
15
15
  let(:collection) { [:sodium, :magnesium, :aluminium, :silicon] }
16
16
  let(:attributes) {
17
17
  {
@@ -15,7 +15,7 @@ module Vedeu
15
15
  name: _name
16
16
  }
17
17
  }
18
- let(:_name) { 'null_generic' }
18
+ let(:_name) { :vedeu_null_generic }
19
19
 
20
20
  describe '#name' do
21
21
  it { instance.must_respond_to(:name) }
@@ -65,39 +65,6 @@ module Vedeu
65
65
  end
66
66
  end
67
67
 
68
- describe '#reset!' do
69
- before { described.write(:original, [:original_data]) }
70
-
71
- subject { described.reset! }
72
-
73
- it { described.must_respond_to(:reset) }
74
- it { subject.must_equal(empty) }
75
- end
76
-
77
- describe '#storage' do
78
- subject { described.storage }
79
-
80
- context 'when the storage is empty' do
81
- it { subject.must_equal(empty) }
82
- end
83
-
84
- context 'when the storage is not empty' do
85
- let(:expected) {
86
- {
87
- compressed: 'compressed_data',
88
- original: [:original_data],
89
- }
90
- }
91
-
92
- before {
93
- described.write(:original, [:original_data])
94
- described.write(:compressed, 'compressed_data')
95
- }
96
-
97
- it { subject.must_equal(expected) }
98
- end
99
- end
100
-
101
68
  describe '#write' do
102
69
  let(:key) {}
103
70
  let(:_value) {}
@@ -37,14 +37,6 @@ module Vedeu
37
37
  it { described.must_respond_to(:render) }
38
38
  end
39
39
 
40
- describe '.reset!' do
41
- subject { described.reset! }
42
-
43
- it { described.must_respond_to(:reset) }
44
- it { subject.must_be_instance_of(Set) }
45
- it { subject.size.must_equal(1) }
46
- end
47
-
48
40
  end # Renderers
49
41
 
50
42
  end # Vedeu
@@ -9,7 +9,7 @@ module Vedeu
9
9
  class RepositoriesTestClass < Vedeu::Repositories::Repository
10
10
 
11
11
  attr_accessor :storage
12
- alias_method :in_memory, :storage
12
+ alias in_memory storage
13
13
 
14
14
  def initialize(storage = {})
15
15
  @storage = storage
@@ -99,7 +99,7 @@ module Vedeu
99
99
  end
100
100
 
101
101
  describe '#by_name' do
102
- let(:_name) { 'carbon' }
102
+ let(:_name) { :vedeu_repositories_repository }
103
103
 
104
104
  subject { instance.by_name(_name) }
105
105