vedeu 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vedeu/all.rb +17 -103
- data/lib/vedeu/api/all.rb +15 -0
- data/lib/vedeu/api/internal.rb +4 -0
- data/lib/vedeu/application/all.rb +6 -0
- data/lib/vedeu/bindings/all.rb +32 -0
- data/lib/vedeu/bindings/bindings.rb +0 -14
- data/lib/vedeu/bindings/refresh.rb +8 -2
- data/lib/vedeu/bindings/system.rb +1 -0
- data/lib/vedeu/borders/border.rb +1 -1
- data/lib/vedeu/borders/repository.rb +1 -1
- data/lib/vedeu/buffers/buffer.rb +2 -4
- data/lib/vedeu/buffers/repository.rb +1 -1
- data/lib/vedeu/colours/background.rb +1 -1
- data/lib/vedeu/colours/backgrounds.rb +1 -1
- data/lib/vedeu/colours/foreground.rb +1 -1
- data/lib/vedeu/colours/foregrounds.rb +1 -1
- data/lib/vedeu/colours/translator.rb +4 -3
- data/lib/vedeu/configuration/api.rb +2 -1
- data/lib/vedeu/configuration/cli.rb +1 -1
- data/lib/vedeu/cursors/cursor.rb +26 -26
- data/lib/vedeu/cursors/repository.rb +1 -1
- data/lib/vedeu/distributed/all.rb +16 -0
- data/lib/vedeu/distributed/test_application.rb +3 -3
- data/lib/vedeu/dsl/all.rb +22 -0
- data/lib/vedeu/dsl/composition.rb +43 -40
- data/lib/vedeu/dsl/dsl.rb +6 -3
- data/lib/vedeu/dsl/group.rb +23 -16
- data/lib/vedeu/dsl/interface.rb +48 -38
- data/lib/vedeu/dsl/keymap.rb +6 -7
- data/lib/vedeu/dsl/line.rb +6 -3
- data/lib/vedeu/dsl/stream.rb +2 -1
- data/lib/vedeu/editor/cursor.rb +1 -3
- data/lib/vedeu/editor/document.rb +4 -5
- data/lib/vedeu/editor/documents.rb +1 -1
- data/lib/vedeu/editor/line.rb +2 -3
- data/lib/vedeu/editor/lines.rb +2 -3
- data/lib/vedeu/esc/all.rb +14 -0
- data/lib/vedeu/esc/colours.rb +8 -4
- data/lib/vedeu/esc/esc.rb +89 -84
- data/lib/vedeu/events/aliases.rb +1 -2
- data/lib/vedeu/events/collection.rb +1 -1
- data/lib/vedeu/events/event.rb +1 -1
- data/lib/vedeu/events/repository.rb +1 -1
- data/lib/vedeu/events/trigger.rb +11 -9
- data/lib/vedeu/geometry/dimension.rb +1 -3
- data/lib/vedeu/geometry/generic_coordinate.rb +1 -3
- data/lib/vedeu/geometry/geometry.rb +1 -1
- data/lib/vedeu/geometry/repository.rb +3 -3
- data/lib/vedeu/input/all.rb +3 -0
- data/lib/vedeu/input/keymap.rb +10 -11
- data/lib/vedeu/input/keymaps.rb +1 -1
- data/lib/vedeu/input/keys.rb +1 -1
- data/lib/vedeu/input/mapper.rb +14 -12
- data/lib/vedeu/logging/all.rb +3 -0
- data/lib/vedeu/logging/log.rb +4 -2
- data/lib/vedeu/menus/menu.rb +2 -4
- data/lib/vedeu/menus/repository.rb +1 -1
- data/lib/vedeu/models/all.rb +15 -0
- data/lib/vedeu/models/cell.rb +1 -1
- data/lib/vedeu/models/escape.rb +1 -1
- data/lib/vedeu/models/group.rb +4 -3
- data/lib/vedeu/models/groups.rb +1 -1
- data/lib/vedeu/models/interface.rb +1 -1
- data/lib/vedeu/models/interfaces.rb +1 -1
- data/lib/vedeu/models/views/char.rb +1 -1
- data/lib/vedeu/models/views/collections/chars.rb +1 -1
- data/lib/vedeu/models/views/collections/lines.rb +1 -1
- data/lib/vedeu/models/views/collections/streams.rb +1 -1
- data/lib/vedeu/models/views/collections/view_collection.rb +1 -1
- data/lib/vedeu/models/views/composition.rb +1 -1
- data/lib/vedeu/models/views/line.rb +8 -6
- data/lib/vedeu/models/views/stream.rb +1 -1
- data/lib/vedeu/models/views/view.rb +1 -1
- data/lib/vedeu/null/all.rb +12 -0
- data/lib/vedeu/output/clear/named_group.rb +2 -1
- data/lib/vedeu/output/clear/named_interface.rb +5 -4
- data/lib/vedeu/output/compressor.rb +1 -0
- data/lib/vedeu/output/output.rb +3 -0
- data/lib/vedeu/output/presentation/colour.rb +10 -10
- data/lib/vedeu/output/presentation/presentation.rb +9 -9
- data/lib/vedeu/output/presentation/style.rb +2 -2
- data/lib/vedeu/output/refresh/refresh.rb +35 -0
- data/lib/vedeu/output/refresh/refresh_group.rb +66 -0
- data/lib/vedeu/output/renderers/all.rb +17 -0
- data/lib/vedeu/output/renderers/escape_sequence.rb +4 -2
- data/lib/vedeu/output/renderers/file.rb +7 -6
- data/lib/vedeu/output/renderers/html.rb +9 -7
- data/lib/vedeu/output/renderers/null.rb +1 -1
- data/lib/vedeu/output/renderers/renderer_options.rb +24 -20
- data/lib/vedeu/output/renderers/terminal.rb +1 -1
- data/lib/vedeu/output/renderers/text.rb +1 -1
- data/lib/vedeu/output/wordwrap.rb +7 -4
- data/lib/vedeu/plugins/all.rb +2 -0
- data/lib/vedeu/repositories/all.rb +16 -0
- data/lib/vedeu/repositories/collection.rb +93 -89
- data/lib/vedeu/repositories/model.rb +113 -102
- data/lib/vedeu/repositories/registerable.rb +60 -56
- data/lib/vedeu/repositories/repository.rb +161 -156
- data/lib/vedeu/repositories/store.rb +70 -66
- data/lib/vedeu/runtime/all.rb +15 -0
- data/lib/vedeu/runtime/launcher.rb +19 -16
- data/lib/vedeu/templating/all.rb +6 -0
- data/lib/vedeu/terminal/all.rb +14 -0
- data/lib/vedeu/terminal/buffer.rb +8 -7
- data/lib/vedeu/terminal/mode.rb +11 -10
- data/lib/vedeu/terminal/terminal.rb +50 -45
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/cursors/cursor_test.rb +4 -2
- data/test/lib/vedeu/editor/cursor_test.rb +0 -3
- data/test/lib/vedeu/esc/esc_test.rb +58 -54
- data/test/lib/vedeu/events/collection_test.rb +1 -1
- data/test/lib/vedeu/input/keys_test.rb +1 -1
- data/test/lib/vedeu/input/mapper_test.rb +1 -1
- data/test/lib/vedeu/models/views/collections/chars_test.rb +1 -1
- data/test/lib/vedeu/models/views/collections/lines_test.rb +1 -1
- data/test/lib/vedeu/models/views/collections/streams_test.rb +1 -1
- data/test/lib/vedeu/models/views/collections/view_collection_test.rb +1 -1
- data/test/lib/vedeu/output/refresh/refresh_group_test.rb +43 -0
- data/test/lib/vedeu/output/refresh/refresh_test.rb +50 -0
- data/test/lib/vedeu/output/renderers/renderer_options_test.rb +8 -4
- data/test/lib/vedeu/output/renderers_test.rb +2 -1
- data/test/lib/vedeu/repositories/collection_test.rb +105 -101
- data/test/lib/vedeu/repositories/model_test.rb +56 -52
- data/test/lib/vedeu/repositories/registerable_test.rb +36 -32
- data/test/lib/vedeu/repositories/repository_test.rb +178 -174
- data/test/lib/vedeu/repositories/store_test.rb +109 -105
- data/test/support/examples/material_colours_app.rb +0 -1
- data/test/support/helpers/model_test_class.rb +50 -46
- data/test/test_helper.rb +2 -2
- metadata +21 -9
- data/lib/vedeu/refresh/refresh.rb +0 -31
- data/lib/vedeu/refresh/refresh_group.rb +0 -59
- data/out_ +0 -50
- data/test/lib/vedeu/refresh/refresh_group_test.rb +0 -39
- data/test/lib/vedeu/refresh/refresh_test.rb +0 -46
@@ -2,138 +2,142 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
let(:described) { Vedeu::Collection }
|
8
|
-
let(:instance) { described.new(collection, parent, model_name) }
|
9
|
-
let(:collection) { [] }
|
10
|
-
let(:model_name) { 'elements' }
|
11
|
-
let(:parent) { Vedeu::ModelTestClass.new }
|
12
|
-
|
13
|
-
describe '#initialize' do
|
14
|
-
it { instance.must_be_instance_of(described) }
|
15
|
-
it { instance.instance_variable_get('@collection').must_equal([]) }
|
16
|
-
it { instance.instance_variable_get('@name').must_equal(model_name) }
|
17
|
-
it { instance.instance_variable_get('@parent').must_equal(parent) }
|
18
|
-
end
|
19
|
-
|
20
|
-
describe 'accessors' do
|
21
|
-
it { instance.must_respond_to(:collection) }
|
22
|
-
it { instance.must_respond_to(:all) }
|
23
|
-
it { instance.must_respond_to(:parent) }
|
24
|
-
it { instance.must_respond_to(:parent=) }
|
25
|
-
it { instance.must_respond_to(:name) }
|
26
|
-
it { instance.must_respond_to(:name=) }
|
27
|
-
end
|
28
|
-
|
29
|
-
describe '.coerce' do
|
30
|
-
subject { described.coerce(collection, parent, model_name) }
|
31
|
-
|
32
|
-
# @todo Add more tests.
|
33
|
-
# it { skip }
|
34
|
-
end
|
35
|
-
|
36
|
-
describe '#[]' do
|
37
|
-
let(:collection) { [:hydrogen, :helium, :lithium, :beryllium] }
|
38
|
-
let(:_value) { 1..2 }
|
39
|
-
|
40
|
-
subject { instance[_value] }
|
41
|
-
|
42
|
-
it { subject.must_be_instance_of(Array) }
|
43
|
-
it { subject.must_equal([:helium, :lithium]) }
|
44
|
-
end
|
45
|
-
|
46
|
-
describe '#add' do
|
47
|
-
subject { instance.add(:hydrogen) }
|
48
|
-
|
49
|
-
it { instance.must_respond_to(:<<) }
|
50
|
-
it { subject.must_be_instance_of(Collection) }
|
51
|
-
it { subject.all.must_equal([:hydrogen]) }
|
52
|
-
|
53
|
-
context 'with multiple objects' do
|
54
|
-
subject { instance.add(:hydrogen, :helium) }
|
55
|
-
|
56
|
-
it 'adds all the objects to the collection' do
|
57
|
-
subject.all.must_equal([:hydrogen, :helium])
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
5
|
+
module Repositories
|
61
6
|
|
62
|
-
describe
|
63
|
-
subject { instance.all }
|
7
|
+
describe Collection do
|
64
8
|
|
65
|
-
|
66
|
-
|
9
|
+
let(:described) { Vedeu::Repositories::Collection }
|
10
|
+
let(:instance) { described.new(collection, parent, model_name) }
|
11
|
+
let(:collection) { [] }
|
12
|
+
let(:model_name) { 'elements' }
|
13
|
+
let(:parent) { Vedeu::Repositories::ModelTestClass.new }
|
67
14
|
|
68
|
-
|
69
|
-
|
15
|
+
describe '#initialize' do
|
16
|
+
it { instance.must_be_instance_of(described) }
|
17
|
+
it { instance.instance_variable_get('@collection').must_equal([]) }
|
18
|
+
it { instance.instance_variable_get('@name').must_equal(model_name) }
|
19
|
+
it { instance.instance_variable_get('@parent').must_equal(parent) }
|
20
|
+
end
|
70
21
|
|
71
|
-
|
72
|
-
|
73
|
-
|
22
|
+
describe 'accessors' do
|
23
|
+
it { instance.must_respond_to(:collection) }
|
24
|
+
it { instance.must_respond_to(:all) }
|
25
|
+
it { instance.must_respond_to(:parent) }
|
26
|
+
it { instance.must_respond_to(:parent=) }
|
27
|
+
it { instance.must_respond_to(:name) }
|
28
|
+
it { instance.must_respond_to(:name=) }
|
74
29
|
end
|
75
|
-
end
|
76
30
|
|
77
|
-
|
78
|
-
|
31
|
+
describe '.coerce' do
|
32
|
+
subject { described.coerce(collection, parent, model_name) }
|
79
33
|
|
80
|
-
|
81
|
-
it {
|
34
|
+
# @todo Add more tests.
|
35
|
+
# it { skip }
|
82
36
|
end
|
83
37
|
|
84
|
-
|
85
|
-
|
38
|
+
describe '#[]' do
|
39
|
+
let(:collection) { [:hydrogen, :helium, :lithium, :beryllium] }
|
40
|
+
let(:_value) { 1..2 }
|
86
41
|
|
87
|
-
|
42
|
+
subject { instance[_value] }
|
43
|
+
|
44
|
+
it { subject.must_be_instance_of(Array) }
|
45
|
+
it { subject.must_equal([:helium, :lithium]) }
|
88
46
|
end
|
89
|
-
end
|
90
47
|
|
91
|
-
|
92
|
-
|
48
|
+
describe '#add' do
|
49
|
+
subject { instance.add(:hydrogen) }
|
50
|
+
|
51
|
+
it { instance.must_respond_to(:<<) }
|
52
|
+
it { subject.must_be_instance_of(Collection) }
|
53
|
+
it { subject.all.must_equal([:hydrogen]) }
|
54
|
+
|
55
|
+
context 'with multiple objects' do
|
56
|
+
subject { instance.add(:hydrogen, :helium) }
|
93
57
|
|
94
|
-
|
58
|
+
it 'adds all the objects to the collection' do
|
59
|
+
subject.all.must_equal([:hydrogen, :helium])
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
95
63
|
|
96
|
-
|
64
|
+
describe '#all' do
|
65
|
+
subject { instance.all }
|
97
66
|
|
98
|
-
|
99
|
-
|
67
|
+
it { subject.must_be_instance_of(Array) }
|
68
|
+
it { subject.must_equal([]) }
|
100
69
|
|
101
|
-
|
70
|
+
context 'when the collection is not empty' do
|
71
|
+
before { instance.add(:hydrogen) }
|
72
|
+
|
73
|
+
it 'returns the populated collection' do
|
74
|
+
subject.must_equal([:hydrogen])
|
75
|
+
end
|
76
|
+
end
|
102
77
|
end
|
103
|
-
end
|
104
78
|
|
105
|
-
|
106
|
-
|
79
|
+
describe '#empty?' do
|
80
|
+
subject { instance.empty? }
|
107
81
|
|
108
|
-
|
82
|
+
context 'when the collection is empty' do
|
83
|
+
it { subject.must_be_instance_of(TrueClass) }
|
84
|
+
end
|
85
|
+
|
86
|
+
context 'when the collection is not empty' do
|
87
|
+
before { instance.add(:hydrogen) }
|
109
88
|
|
110
|
-
|
111
|
-
|
89
|
+
it { subject.must_be_instance_of(FalseClass) }
|
90
|
+
end
|
112
91
|
end
|
113
92
|
|
114
|
-
|
115
|
-
|
93
|
+
describe '#eql?' do
|
94
|
+
let(:other) { instance }
|
116
95
|
|
117
|
-
|
96
|
+
subject { instance.eql?(other) }
|
97
|
+
|
98
|
+
it { subject.must_equal(true) }
|
99
|
+
|
100
|
+
context 'when different to other' do
|
101
|
+
let(:other) { described.new([:different]) }
|
102
|
+
|
103
|
+
it { subject.must_equal(false) }
|
104
|
+
end
|
118
105
|
end
|
119
|
-
end
|
120
106
|
|
121
|
-
|
122
|
-
|
107
|
+
describe '#size' do
|
108
|
+
subject { instance.size }
|
109
|
+
|
110
|
+
it { subject.must_be_instance_of(Fixnum) }
|
111
|
+
|
112
|
+
context 'when the collection is empty' do
|
113
|
+
it { subject.must_equal(0) }
|
114
|
+
end
|
123
115
|
|
124
|
-
|
116
|
+
context 'when the collection is not empty' do
|
117
|
+
before { instance.add(:hydrogen) }
|
125
118
|
|
126
|
-
|
127
|
-
|
119
|
+
it { subject.must_equal(1) }
|
120
|
+
end
|
128
121
|
end
|
129
122
|
|
130
|
-
|
131
|
-
|
123
|
+
describe '#to_s' do
|
124
|
+
subject { instance.to_s }
|
125
|
+
|
126
|
+
it { subject.must_be_instance_of(String) }
|
127
|
+
|
128
|
+
context 'when the collection is empty' do
|
129
|
+
it { subject.must_equal('') }
|
130
|
+
end
|
132
131
|
|
133
|
-
|
132
|
+
context 'when the collection is not empty' do
|
133
|
+
before { instance.add(:hydrogen) }
|
134
|
+
|
135
|
+
it { subject.must_equal('hydrogen') }
|
136
|
+
end
|
134
137
|
end
|
135
|
-
end
|
136
138
|
|
137
|
-
|
139
|
+
end # Collection
|
140
|
+
|
141
|
+
end # Repositories
|
138
142
|
|
139
143
|
end # Vedeu
|
@@ -2,82 +2,86 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
-
|
5
|
+
module Repositories
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
{
|
11
|
-
|
7
|
+
describe Model do
|
8
|
+
|
9
|
+
let(:described) { Vedeu::Repositories::ModelTestClass }
|
10
|
+
let(:instance) { described.new(attributes) }
|
11
|
+
let(:attributes) {
|
12
|
+
{
|
13
|
+
name: 'hydrogen'
|
14
|
+
}
|
12
15
|
}
|
13
|
-
}
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
describe 'accessors' do
|
18
|
+
it { instance.must_respond_to(:repository) }
|
19
|
+
it { instance.must_respond_to(:repository=) }
|
20
|
+
end
|
19
21
|
|
20
|
-
|
21
|
-
|
22
|
+
describe '.build' do
|
23
|
+
let(:attributes) {}
|
22
24
|
|
23
|
-
|
25
|
+
subject { described.build(attributes) { } }
|
24
26
|
|
25
|
-
|
26
|
-
|
27
|
-
|
27
|
+
# @todo Add more tests.
|
28
|
+
# it { skip }
|
29
|
+
end
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
+
describe '.by_name' do
|
32
|
+
let(:_name) {}
|
31
33
|
|
32
|
-
|
34
|
+
subject { described.by_name(_name) }
|
33
35
|
|
34
|
-
|
35
|
-
|
36
|
-
|
36
|
+
context 'when the model has no repository set' do
|
37
|
+
it { subject.must_be_instance_of(NilClass) }
|
38
|
+
end
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
-
|
40
|
+
context 'when the model has a repository set' do
|
41
|
+
# @todo Add more tests.
|
42
|
+
# it { skip }
|
43
|
+
end
|
41
44
|
end
|
42
|
-
end
|
43
45
|
|
44
|
-
|
45
|
-
|
46
|
+
describe '.child' do
|
47
|
+
let(:klass) {}
|
46
48
|
|
47
|
-
|
49
|
+
subject { described.child(klass) }
|
48
50
|
|
49
|
-
|
50
|
-
|
51
|
+
it { described.must_respond_to(:member) }
|
52
|
+
it { described.must_respond_to(:collection) }
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
-
|
54
|
+
# @todo Add more tests.
|
55
|
+
# it { skip }
|
56
|
+
end
|
55
57
|
|
56
|
-
|
57
|
-
|
58
|
+
describe '.repository' do
|
59
|
+
let(:klass) {}
|
58
60
|
|
59
|
-
|
61
|
+
subject { described.repository(klass) }
|
60
62
|
|
61
|
-
|
62
|
-
|
63
|
-
|
63
|
+
# @todo Add more tests.
|
64
|
+
# it { skip }
|
65
|
+
end
|
64
66
|
|
65
|
-
|
66
|
-
|
67
|
+
describe '#deputy' do
|
68
|
+
subject { instance.deputy }
|
67
69
|
|
68
|
-
|
69
|
-
subject.must_be_instance_of(
|
70
|
+
# it 'returns the DSL instance' do
|
71
|
+
# subject.must_be_instance_of(Vedeu::Repositories::ModelTestClass::DSL)
|
72
|
+
# end
|
70
73
|
end
|
71
|
-
end
|
72
74
|
|
73
|
-
|
74
|
-
|
75
|
+
describe '#store' do
|
76
|
+
subject { instance.store }
|
75
77
|
|
76
|
-
|
77
|
-
|
78
|
+
it 'returns the model' do
|
79
|
+
subject.must_be_instance_of(Vedeu::Repositories::ModelTestClass)
|
80
|
+
end
|
78
81
|
end
|
79
|
-
end
|
80
82
|
|
81
|
-
|
83
|
+
end # Model
|
84
|
+
|
85
|
+
end # Repositories
|
82
86
|
|
83
87
|
end # Vedeu
|
@@ -2,54 +2,58 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
-
|
5
|
+
module Repositories
|
6
6
|
|
7
|
-
|
7
|
+
describe Registerable do
|
8
8
|
|
9
|
-
|
9
|
+
class RegisterableTestClass
|
10
10
|
|
11
|
-
|
12
|
-
real Vedeu::ModelTestClass
|
11
|
+
include Vedeu::Repositories::Registerable
|
13
12
|
|
14
|
-
|
13
|
+
null Vedeu::Repositories::ModelTestClass
|
14
|
+
real Vedeu::Repositories::ModelTestClass
|
15
15
|
|
16
|
-
|
16
|
+
end
|
17
17
|
|
18
|
-
|
19
|
-
it { RegisterableTestClass.must_respond_to(:register) }
|
18
|
+
let(:described) { Vedeu::Repositories::Registerable }
|
20
19
|
|
21
|
-
|
22
|
-
|
20
|
+
it { RegisterableTestClass.must_respond_to(:repository) }
|
21
|
+
it { RegisterableTestClass.must_respond_to(:register) }
|
23
22
|
|
24
|
-
|
23
|
+
describe '.null' do
|
24
|
+
subject { RegisterableTestClass.new }
|
25
25
|
|
26
|
-
|
27
|
-
it { subject.null_model.must_equal(Vedeu::ModelTestClass) }
|
28
|
-
end
|
26
|
+
it { RegisterableTestClass.must_respond_to(:null) }
|
29
27
|
|
30
|
-
|
31
|
-
|
28
|
+
it { subject.must_respond_to(:null_model) }
|
29
|
+
it { subject.null_model.must_equal(Vedeu::Repositories::ModelTestClass) }
|
30
|
+
end
|
32
31
|
|
33
|
-
|
32
|
+
describe '.real' do
|
33
|
+
subject { RegisterableTestClass.new }
|
34
34
|
|
35
|
-
|
36
|
-
it { subject.model.must_equal(Vedeu::ModelTestClass) }
|
37
|
-
end
|
35
|
+
it { RegisterableTestClass.must_respond_to(:real) }
|
38
36
|
|
39
|
-
|
40
|
-
|
37
|
+
it { subject.must_respond_to(:model) }
|
38
|
+
it { subject.model.must_equal(Vedeu::Repositories::ModelTestClass) }
|
39
|
+
end
|
41
40
|
|
42
|
-
|
41
|
+
describe '.reset' do
|
42
|
+
subject { RegisterableTestClass.reset! }
|
43
43
|
|
44
|
-
|
45
|
-
it { RegisterableTestClass.must_respond_to(:reset) }
|
44
|
+
before { RegisterableTestClass.stubs(:register) }
|
46
45
|
|
47
|
-
|
48
|
-
RegisterableTestClass.
|
49
|
-
subject
|
50
|
-
}
|
51
|
-
end
|
46
|
+
it { RegisterableTestClass.must_respond_to(:reset!) }
|
47
|
+
it { RegisterableTestClass.must_respond_to(:reset) }
|
52
48
|
|
53
|
-
|
49
|
+
it {
|
50
|
+
RegisterableTestClass.expects(:register)
|
51
|
+
subject
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
end # Registerable
|
56
|
+
|
57
|
+
end # Repositories
|
54
58
|
|
55
59
|
end # Vedeu
|