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
@@ -6,9 +6,6 @@ module Vedeu
6
6
 
7
7
  module Output
8
8
 
9
- # class CompressorCacheTestClass
10
- # end
11
-
12
9
  describe CompressorCache do
13
10
 
14
11
  let(:described) { Vedeu::Output::CompressorCache }
@@ -8,8 +8,9 @@ module Vedeu
8
8
 
9
9
  describe Colour do
10
10
 
11
- let(:described) { Vedeu::Presentation::Colour }
12
- let(:includer) { Vedeu::PresentationColourTestClass.new(attributes) }
11
+ let(:described) { Vedeu::Presentation::Colour }
12
+ let(:included_described) { Vedeu::PresentationColourTestClass }
13
+ let(:included_instance) { included_described.new(attributes) }
13
14
  let(:attributes) {
14
15
  {
15
16
  colour: colour,
@@ -27,7 +28,7 @@ module Vedeu
27
28
  let(:parent) { Vedeu::ParentPresentationColourTestClass.new }
28
29
 
29
30
  describe '#background' do
30
- subject { includer.background }
31
+ subject { included_instance.background }
31
32
 
32
33
  it { subject.must_be_instance_of(Vedeu::Colours::Background) }
33
34
 
@@ -53,19 +54,19 @@ module Vedeu
53
54
  end
54
55
 
55
56
  describe '#background=' do
56
- subject { includer.background = '#987654' }
57
+ subject { included_instance.background = '#987654' }
57
58
 
58
59
  it do
59
- includer.colour.background.colour.must_equal('#000033')
60
+ included_instance.colour.background.colour.must_equal('#000033')
60
61
  subject
61
- includer.colour.background.colour.must_equal('#987654')
62
+ included_instance.colour.background.colour.must_equal('#987654')
62
63
  end
63
64
 
64
65
  it { subject.must_equal('#987654') }
65
66
  end
66
67
 
67
68
  describe '#colour' do
68
- subject { includer.colour }
69
+ subject { included_instance.colour }
69
70
 
70
71
  it { subject.must_be_instance_of(Vedeu::Colours::Colour) }
71
72
 
@@ -96,13 +97,13 @@ module Vedeu
96
97
  Vedeu::Colours::Colour.new(foreground: '#00ff00', background: '#000000')
97
98
  }
98
99
 
99
- subject { includer.colour=(colour) }
100
+ subject { included_instance.colour=(colour) }
100
101
 
101
102
  it { subject.must_be_instance_of(Vedeu::Colours::Colour) }
102
103
  end
103
104
 
104
105
  describe '#foreground' do
105
- subject { includer.foreground }
106
+ subject { included_instance.foreground }
106
107
 
107
108
  it { subject.must_be_instance_of(Vedeu::Colours::Foreground) }
108
109
  it { subject.colour.must_equal('#aadd00') }
@@ -129,12 +130,12 @@ module Vedeu
129
130
  end
130
131
 
131
132
  describe '#foreground=' do
132
- subject { includer.foreground = '#123456' }
133
+ subject { included_instance.foreground = '#123456' }
133
134
 
134
135
  it do
135
- includer.colour.foreground.colour.must_equal('#aadd00')
136
+ included_instance.colour.foreground.colour.must_equal('#aadd00')
136
137
  subject
137
- includer.colour.foreground.colour.must_equal('#123456')
138
+ included_instance.colour.foreground.colour.must_equal('#123456')
138
139
  end
139
140
 
140
141
  it { subject.must_equal('#123456') }
@@ -36,7 +36,9 @@ module Vedeu
36
36
 
37
37
  describe Presentation do
38
38
 
39
- let(:includer) { Vedeu::PresentationTestClass.new(attributes) }
39
+ let(:described) { Vedeu::Presentation }
40
+ let(:included_described) { Vedeu::PresentationTestClass }
41
+ let(:included_instance) { included_described.new(attributes) }
40
42
  let(:attributes) {
41
43
  {
42
44
  colour: { background: background, foreground: foreground },
@@ -80,7 +82,7 @@ module Vedeu
80
82
  "\e[38;2;255;0;0m\e[48;2;0;0;0m\e[4mt"
81
83
  }
82
84
 
83
- it { includer.must_respond_to(:to_str) }
85
+ it { included_instance.must_respond_to(:to_str) }
84
86
 
85
87
  it 'returns output' do
86
88
  stream.to_s.must_equal(expected)
@@ -34,7 +34,9 @@ module Vedeu
34
34
 
35
35
  describe Styles do
36
36
 
37
- let(:includer) { Vedeu::PresentationStyleTestClass.new(attributes) }
37
+ let(:described) { Vedeu::Presentation::Styles }
38
+ let(:included_described) { Vedeu::PresentationStyleTestClass }
39
+ let(:included_instance) { included_described.new(attributes) }
38
40
  let(:attributes) {
39
41
  {
40
42
  parent: parent,
@@ -45,7 +47,7 @@ module Vedeu
45
47
  let(:style) { ['bold'] }
46
48
 
47
49
  describe '#style' do
48
- subject { includer.style }
50
+ subject { included_instance.style }
49
51
 
50
52
  it { subject.must_be_instance_of(Vedeu::Presentation::Style) }
51
53
 
@@ -71,7 +73,7 @@ module Vedeu
71
73
  describe '#style=' do
72
74
  let(:style) { Vedeu::Presentation::Style.new('normal') }
73
75
 
74
- subject { includer.style = (style) }
76
+ subject { included_instance.style = (style) }
75
77
 
76
78
  it { subject.must_be_instance_of(Vedeu::Presentation::Style) }
77
79
  end
@@ -15,10 +15,8 @@ module Vedeu
15
15
  describe Options do
16
16
 
17
17
  let(:described) { Vedeu::Renderers::Options }
18
- let(:instance) {}
19
-
20
- let(:including_described) { Vedeu::Renderers::RenderersTestClass }
21
- let(:including_instance) { including_described.new(options) }
18
+ let(:included_described) { Vedeu::Renderers::RenderersTestClass }
19
+ let(:included_instance) { included_described.new(options) }
22
20
  let(:options) {
23
21
  {
24
22
  compression: compression,
@@ -47,38 +45,38 @@ module Vedeu
47
45
  let(:write_file) { false }
48
46
 
49
47
  describe '#initialize' do
50
- it { including_instance.must_be_instance_of(including_described) }
51
- it { including_instance.instance_variable_get('@options').must_equal(options) }
48
+ it { included_instance.must_be_instance_of(included_described) }
49
+ it { included_instance.instance_variable_get('@options').must_equal(options) }
52
50
  end
53
51
 
54
52
  describe '#clear' do
55
- subject { including_instance.clear }
53
+ subject { included_instance.clear }
56
54
 
57
55
  it { proc { subject }.must_raise(Vedeu::Error::NotImplemented) }
58
56
  end
59
57
 
60
58
  describe '#options' do
61
- it { including_instance.must_respond_to(:options) }
59
+ it { included_instance.must_respond_to(:options) }
62
60
  end
63
61
 
64
62
  describe '#options=' do
65
- it { including_instance.must_respond_to(:options=) }
63
+ it { included_instance.must_respond_to(:options=) }
66
64
  end
67
65
 
68
66
  describe '#render' do
69
- subject { including_instance.render }
67
+ subject { included_instance.render }
70
68
 
71
69
  it { proc { subject }.must_raise(Vedeu::Error::NotImplemented) }
72
70
  end
73
71
 
74
72
  describe '#write' do
75
- subject { including_instance.write }
73
+ subject { included_instance.write }
76
74
 
77
75
  it { proc { subject }.must_raise(Vedeu::Error::NotImplemented) }
78
76
  end
79
77
 
80
78
  # describe '#compression?' do
81
- # subject { including_instance.compression? }
79
+ # subject { included_instance.compression? }
82
80
 
83
81
  # context 'when the option is not set or is set to false' do
84
82
  # before { options.tap { |o| o.delete(:compression) } }
@@ -21,13 +21,14 @@ module Vedeu
21
21
  describe Assemblage do
22
22
 
23
23
  let(:described) { Vedeu::Repositories::Assemblage }
24
- let(:instance) { Vedeu::Repositories::CollectionTestClass.new(collection) }
24
+ let(:included_described) { Vedeu::Repositories::CollectionTestClass }
25
+ let(:included_instance) { included_described.new(collection) }
25
26
  let(:collection) { 'Some text...'.chars }
26
27
 
27
28
  describe '#[]' do
28
29
  let(:collection) { [:hydrogen, :helium, :lithium, :beryllium] }
29
30
 
30
- subject { instance[index] }
31
+ subject { included_instance[index] }
31
32
 
32
33
  context 'when the index is a range' do
33
34
  let(:index) { 1..2 }
@@ -45,7 +46,7 @@ module Vedeu
45
46
  end
46
47
 
47
48
  describe '#any?' do
48
- subject { instance.any? }
49
+ subject { included_instance.any? }
49
50
 
50
51
  context 'when the collection is empty' do
51
52
  let(:collection) { [] }
@@ -59,7 +60,7 @@ module Vedeu
59
60
  end
60
61
 
61
62
  describe '#empty?' do
62
- subject { instance.empty? }
63
+ subject { included_instance.empty? }
63
64
 
64
65
  context 'when the collection is empty' do
65
66
  let(:collection) { [] }
@@ -73,18 +74,18 @@ module Vedeu
73
74
  end
74
75
 
75
76
  describe '#eql?' do
76
- let(:other) { instance }
77
+ let(:other) { included_instance }
77
78
 
78
- subject { instance.eql?(other) }
79
+ subject { included_instance.eql?(other) }
79
80
 
80
81
  it { subject.must_equal(true) }
81
82
 
82
83
  context 'when different to other' do
83
84
  let(:some_collection) {
84
- Vedeu::Repositories::CollectionTestClass.new('Some text...'.chars)
85
+ included_described.new('Some text...'.chars)
85
86
  }
86
87
  let(:other_collection) {
87
- Vedeu::Repositories::CollectionTestClass.new('Other text...'.chars)
88
+ included_described.new('Other text...'.chars)
88
89
  }
89
90
 
90
91
  it { (some_collection == other_collection).must_equal(false) }
@@ -92,11 +93,11 @@ module Vedeu
92
93
  end
93
94
 
94
95
  describe '#==' do
95
- it { instance.must_respond_to(:==) }
96
+ it { included_instance.must_respond_to(:==) }
96
97
  end
97
98
 
98
99
  describe '#size' do
99
- subject { instance.size }
100
+ subject { included_instance.size }
100
101
 
101
102
  context 'when the collection is empty' do
102
103
  let(:collection) { [] }
@@ -59,7 +59,7 @@ module Vedeu
59
59
  describe '#add' do
60
60
  subject { instance.add(:hydrogen) }
61
61
 
62
- it { subject.must_be_instance_of(Vedeu::Repositories::Collection) }
62
+ it { subject.must_be_instance_of(described) }
63
63
  it { subject.all.must_equal([:hydrogen]) }
64
64
  end
65
65
 
@@ -22,9 +22,9 @@ module Vedeu
22
22
 
23
23
  describe Defaults do
24
24
 
25
- let(:described) { Vedeu::Repositories::Defaults }
26
- let(:includer) { Vedeu::Repositories::DefaultsTestClass }
27
- let(:instance) { includer.new(attributes) }
25
+ let(:described) { Vedeu::Repositories::Defaults }
26
+ let(:included_described) { Vedeu::Repositories::DefaultsTestClass }
27
+ let(:included_instance) { included_described.new(attributes) }
28
28
  let(:attributes) {
29
29
  {
30
30
  invalid_attribute: :invalid_value
@@ -32,20 +32,22 @@ module Vedeu
32
32
  }
33
33
 
34
34
  describe '#initialize' do
35
- it { instance.must_be_instance_of(includer) }
35
+ it { included_instance.must_be_instance_of(included_described) }
36
36
  it do
37
- instance.instance_variable_get('@some_attribute').
37
+ included_instance.instance_variable_get('@some_attribute').
38
38
  must_equal(:some_value)
39
39
  end
40
40
  it do
41
- instance.instance_variables.
41
+ included_instance.instance_variables.
42
42
  must_equal([:@some_attribute])
43
43
  end
44
44
 
45
45
  context 'when the attributes is not a Hash' do
46
46
  let(:attributes) { :invalid }
47
47
 
48
- it { proc { instance }.must_raise(Vedeu::Error::InvalidSyntax) }
48
+ it do
49
+ proc { included_instance }.must_raise(Vedeu::Error::InvalidSyntax)
50
+ end
49
51
  end
50
52
  end
51
53
 
@@ -8,8 +8,9 @@ module Vedeu
8
8
 
9
9
  describe Model do
10
10
 
11
- let(:described) { Vedeu::Repositories::ModelTestClass }
12
- let(:instance) { described.new(attributes) }
11
+ let(:described) { Vedeu::Repositories::Model }
12
+ let(:included_described) { Vedeu::Repositories::ModelTestClass }
13
+ let(:included_instance) { included_described.new(attributes) }
13
14
  let(:attributes) {
14
15
  {
15
16
  name: 'hydrogen'
@@ -17,17 +18,17 @@ module Vedeu
17
18
  }
18
19
 
19
20
  describe '#repository' do
20
- it { instance.must_respond_to(:repository) }
21
+ it { included_instance.must_respond_to(:repository) }
21
22
  end
22
23
 
23
24
  describe '#repository=' do
24
- it { instance.must_respond_to(:repository=) }
25
+ it { included_instance.must_respond_to(:repository=) }
25
26
  end
26
27
 
27
28
  describe '.build' do
28
29
  let(:attributes) {}
29
30
 
30
- subject { described.build(attributes) { } }
31
+ subject { included_described.build(attributes) { } }
31
32
 
32
33
  # @todo Add more tests.
33
34
  # it { skip }
@@ -36,7 +37,7 @@ module Vedeu
36
37
  describe '.repository' do
37
38
  let(:klass) {}
38
39
 
39
- subject { described.repository(klass) }
40
+ subject { included_described.repository(klass) }
40
41
 
41
42
  # @todo Add more tests.
42
43
  # it { skip }
@@ -46,11 +47,11 @@ module Vedeu
46
47
  let(:klass) {}
47
48
 
48
49
  context 'when a block is given' do
49
- subject { described.store(klass) }
50
+ subject { included_described.store(klass) }
50
51
  end
51
52
 
52
53
  context 'when a block is not given' do
53
- subject { described.store(klass) { :some_proc } }
54
+ subject { included_described.store(klass) { :some_proc } }
54
55
  end
55
56
 
56
57
  # @todo Add more tests.
@@ -58,7 +59,7 @@ module Vedeu
58
59
  end
59
60
 
60
61
  describe '#store' do
61
- subject { instance.store }
62
+ subject { included_instance.store }
62
63
 
63
64
  it 'returns the model' do
64
65
  subject.must_be_instance_of(Vedeu::Repositories::ModelTestClass)
@@ -6,26 +6,27 @@ module Vedeu
6
6
 
7
7
  module Repositories
8
8
 
9
- describe Registerable do
9
+ class RegisterableTestClass
10
10
 
11
- class RegisterableTestClass
11
+ include Vedeu::Repositories::Registerable
12
12
 
13
- include Vedeu::Repositories::Registerable
13
+ null Vedeu::Repositories::ModelTestClass
14
+ real Vedeu::Repositories::ModelTestClass
14
15
 
15
- null Vedeu::Repositories::ModelTestClass
16
- real Vedeu::Repositories::ModelTestClass
16
+ end
17
17
 
18
- end
18
+ describe Registerable do
19
19
 
20
- let(:described) { Vedeu::Repositories::Registerable }
20
+ let(:described) { Vedeu::Repositories::Registerable }
21
+ let(:included_described) { Vedeu::Repositories::RegisterableTestClass }
21
22
 
22
- it { RegisterableTestClass.must_respond_to(:repository) }
23
- it { RegisterableTestClass.must_respond_to(:register) }
23
+ it { included_described.must_respond_to(:repository) }
24
+ it { included_described.must_respond_to(:register) }
24
25
 
25
26
  describe '.null' do
26
- subject { RegisterableTestClass.new }
27
+ subject { included_described.new }
27
28
 
28
- it { RegisterableTestClass.must_respond_to(:null) }
29
+ it { included_described.must_respond_to(:null) }
29
30
 
30
31
  it { subject.must_respond_to(:null_model) }
31
32
  it { subject.must_respond_to(:null_attributes) }
@@ -34,24 +35,24 @@ module Vedeu
34
35
  end
35
36
 
36
37
  describe '.real' do
37
- subject { RegisterableTestClass.new }
38
+ subject { included_described.new }
38
39
 
39
- it { RegisterableTestClass.must_respond_to(:real) }
40
+ it { included_described.must_respond_to(:real) }
40
41
 
41
42
  it { subject.must_respond_to(:model) }
42
43
  it { subject.model.must_equal(Vedeu::Repositories::ModelTestClass) }
43
44
  end
44
45
 
45
46
  describe '.reset' do
46
- subject { RegisterableTestClass.reset! }
47
+ subject { included_described.reset! }
47
48
 
48
- before { RegisterableTestClass.stubs(:register) }
49
+ before { included_described.stubs(:register) }
49
50
 
50
- it { RegisterableTestClass.must_respond_to(:reset!) }
51
- it { RegisterableTestClass.must_respond_to(:reset) }
51
+ it { included_described.must_respond_to(:reset!) }
52
+ it { included_described.must_respond_to(:reset) }
52
53
 
53
54
  it do
54
- RegisterableTestClass.expects(:register)
55
+ included_described.expects(:register)
55
56
  subject
56
57
  end
57
58
  end