macros4cuke 0.5.14 → 0.5.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +7 -9
- data/CHANGELOG.md +20 -11
- data/Gemfile +2 -2
- data/LICENSE.txt +1 -1
- data/README.md +43 -42
- data/Rakefile +54 -54
- data/appveyor.yml +20 -0
- data/bin/macros4cuke +14 -15
- data/lib/macro_steps.rb +3 -3
- data/lib/macros4cuke/application.rb +1 -3
- data/lib/macros4cuke/cli/cmd-line.rb +1 -3
- data/lib/macros4cuke/coll-walker-factory.rb +1 -1
- data/lib/macros4cuke/constants.rb +2 -2
- data/lib/macros4cuke/formatter/all-notifications.rb +1 -1
- data/lib/macros4cuke/formatter/to-gherkin.rb +4 -6
- data/lib/macros4cuke/formatter/to-null.rb +14 -14
- data/lib/macros4cuke/formatter/to-trace.rb +1 -3
- data/lib/macros4cuke/formatting-service.rb +2 -2
- data/lib/macros4cuke/macro-collection.rb +4 -6
- data/lib/macros4cuke/macro-step-support.rb +0 -2
- data/lib/macros4cuke/macro-step.rb +18 -19
- data/lib/macros4cuke/templating/comment.rb +0 -2
- data/lib/macros4cuke/templating/engine.rb +26 -29
- data/lib/macros4cuke/templating/eo-line.rb +18 -21
- data/lib/macros4cuke/templating/placeholder.rb +12 -12
- data/lib/macros4cuke/templating/section.rb +1 -5
- data/lib/macros4cuke/templating/static-text.rb +0 -2
- data/lib/macros4cuke/templating/template-element.rb +6 -7
- data/spec/macros4cuke/cli/cmd-line_spec.rb +4 -4
- data/spec/macros4cuke/coll-walker-factory_spec.rb +42 -42
- data/spec/macros4cuke/formatter/to-trace_spec.rb +148 -149
- data/spec/macros4cuke/macro-collection_spec.rb +2 -2
- data/spec/macros4cuke/macro-step-support_spec.rb +10 -9
- data/spec/macros4cuke/macro-step_spec.rb +10 -9
- data/spec/macros4cuke/templating/comment_spec.rb +37 -38
- data/spec/macros4cuke/templating/engine_spec.rb +19 -22
- data/spec/macros4cuke/templating/eo-line_spec.rb +31 -32
- data/spec/macros4cuke/templating/placeholder_spec.rb +1 -2
- data/spec/macros4cuke/templating/section_spec.rb +10 -7
- data/spec/macros4cuke/templating/static_text_spec.rb +38 -39
- data/spec/macros4cuke/use-sample-collection.rb +3 -3
- metadata +9 -8
@@ -183,57 +183,57 @@ describe CollWalkerFactory do
|
|
183
183
|
[
|
184
184
|
[:on_placeholder, 3, :name], # 0
|
185
185
|
[:on_static_text, 3, :source], # 1
|
186
|
-
[:on_eol, 3, nil],
|
186
|
+
[:on_eol, 3, nil], # 2
|
187
187
|
[:on_static_text, 3, :source], # 3
|
188
188
|
[:on_placeholder, 3, :name], # 4
|
189
|
-
[:on_static_text, 3, :source],
|
190
|
-
[:on_eol, 3, nil],
|
191
|
-
[:on_static_text, 3, :source],
|
192
|
-
[:on_placeholder, 3, :name],
|
193
|
-
[:on_static_text, 3, :source],
|
194
|
-
[:on_eol, 3, nil],
|
195
|
-
[:on_static_text, 3, :source],
|
196
|
-
[:on_placeholder, 3, :name],
|
197
|
-
[:on_static_text, 3, :source],
|
198
|
-
[:on_eol, 3, nil],
|
199
|
-
[:on_static_text, 3, :source],
|
200
|
-
[:on_placeholder, 3, :name],
|
201
|
-
[:on_static_text, 3, :source],
|
202
|
-
[:on_eol, 3, nil],
|
203
|
-
[:on_static_text, 3, :source],
|
204
|
-
[:on_placeholder, 3, :name],
|
205
|
-
[:on_static_text, 3, :source],
|
206
|
-
[:on_eol, 3, nil],
|
207
|
-
[:on_eol, 3, nil],
|
189
|
+
[:on_static_text, 3, :source], # 5
|
190
|
+
[:on_eol, 3, nil], # 6
|
191
|
+
[:on_static_text, 3, :source], # 7
|
192
|
+
[:on_placeholder, 3, :name], # 8
|
193
|
+
[:on_static_text, 3, :source], # 9
|
194
|
+
[:on_eol, 3, nil], # 10
|
195
|
+
[:on_static_text, 3, :source], # 11
|
196
|
+
[:on_placeholder, 3, :name], # 12
|
197
|
+
[:on_static_text, 3, :source], # 13
|
198
|
+
[:on_eol, 3, nil], # 14
|
199
|
+
[:on_static_text, 3, :source], # 15
|
200
|
+
[:on_placeholder, 3, :name], # 16
|
201
|
+
[:on_static_text, 3, :source], # 17
|
202
|
+
[:on_eol, 3, nil], # 18
|
203
|
+
[:on_static_text, 3, :source], # 19
|
204
|
+
[:on_placeholder, 3, :name], # 20
|
205
|
+
[:on_static_text, 3, :source], # 21
|
206
|
+
[:on_eol, 3, nil], # 22
|
207
|
+
[:on_eol, 3, nil], # 23
|
208
208
|
[:on_comment, 3, :source], # 24
|
209
|
-
[:on_eol, 3, nil],
|
209
|
+
[:on_eol, 3, nil], # 25
|
210
210
|
[:on_comment, 3, :source], # 26
|
211
|
-
[:on_eol, 3, nil],
|
211
|
+
[:on_eol, 3, nil], # 27
|
212
212
|
[:on_comment, 3, :source], # 28
|
213
|
-
[:on_eol, 3, nil],
|
214
|
-
[:on_section, 3, :name],
|
215
|
-
[:on_static_text, 4, :source],
|
216
|
-
[:on_placeholder, 4, :name],
|
217
|
-
[:on_static_text, 4, :source],
|
218
|
-
[:on_eol, 4, nil],
|
219
|
-
[:on_section_end, 3, nil],
|
220
|
-
[:on_eol, 3, nil],
|
213
|
+
[:on_eol, 3, nil], # 29
|
214
|
+
[:on_section, 3, :name], # 30
|
215
|
+
[:on_static_text, 4, :source], # 31
|
216
|
+
[:on_placeholder, 4, :name], # 32
|
217
|
+
[:on_static_text, 4, :source], # 33
|
218
|
+
[:on_eol, 4, nil], # 34
|
219
|
+
[:on_section_end, 3, nil], # 35
|
220
|
+
[:on_eol, 3, nil], # 36
|
221
221
|
[:on_comment, 3, :source], # 37
|
222
|
-
[:on_eol, 3, nil],
|
222
|
+
[:on_eol, 3, nil], # 38
|
223
223
|
[:on_comment, 3, :source], # 39
|
224
|
-
[:on_eol, 3, nil],
|
224
|
+
[:on_eol, 3, nil], # 40
|
225
225
|
[:on_comment, 3, :source], # 41
|
226
|
-
[:on_eol, 3, nil],
|
227
|
-
[:on_section, 3, :name],
|
228
|
-
[:on_static_text, 4, :source],
|
229
|
-
[:on_placeholder, 4, :name],
|
230
|
-
[:on_static_text, 4, :source],
|
231
|
-
[:on_eol, 4, nil],
|
232
|
-
[:on_section_end, 3, nil],
|
233
|
-
[:on_static_text, 3, :source],
|
226
|
+
[:on_eol, 3, nil], # 42
|
227
|
+
[:on_section, 3, :name], # 43
|
228
|
+
[:on_static_text, 4, :source], # 44
|
229
|
+
[:on_placeholder, 4, :name], # 45
|
230
|
+
[:on_static_text, 4, :source], # 46
|
231
|
+
[:on_eol, 4, nil], # 47
|
232
|
+
[:on_section_end, 3, nil], # 48
|
233
|
+
[:on_static_text, 3, :source], # 49
|
234
234
|
[:on_eol, 3, nil], # 50
|
235
|
-
[:on_renderer_end, 2, nil],
|
236
|
-
[:on_step_end, 1, nil],
|
235
|
+
[:on_renderer_end, 2, nil], # 51
|
236
|
+
[:on_step_end, 1, nil], # 52
|
237
237
|
[:on_collection_end, 0, nil] # 53
|
238
238
|
].each_with_index do |event, i|
|
239
239
|
actual = subject.next
|
@@ -1,149 +1,148 @@
|
|
1
|
-
# File: to-trace_spec.rb
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
module
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
instance
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
on_eol
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
service
|
139
|
-
service.
|
140
|
-
expect
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
end #
|
145
|
-
end # module
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
# End of file
|
1
|
+
# File: to-trace_spec.rb
|
2
|
+
require 'stringio'
|
3
|
+
require_relative '../../spec_helper'
|
4
|
+
|
5
|
+
# Load mix-in module for creating a sample collection of macro-steps
|
6
|
+
require_relative '../use-sample-collection'
|
7
|
+
|
8
|
+
|
9
|
+
require_relative '../../../lib/macros4cuke/formatting-service'
|
10
|
+
# Load the class under test
|
11
|
+
require_relative '../../../lib/macros4cuke/formatter/to-trace'
|
12
|
+
|
13
|
+
module Macros4Cuke
|
14
|
+
module Formatter # Open this namespace to get rid of module qualifier prefixes
|
15
|
+
describe ToTrace do
|
16
|
+
include UseSampleCollection # Add convenience methods for sample collection
|
17
|
+
|
18
|
+
let(:destination) { StringIO.new }
|
19
|
+
|
20
|
+
before(:all) do
|
21
|
+
# Fill the collection of macro-steps with sample steps
|
22
|
+
fill_collection
|
23
|
+
end
|
24
|
+
|
25
|
+
after(:all) do
|
26
|
+
# Clear the collection to prevent interference between spec files
|
27
|
+
macro_coll.clear
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
context 'Initialization:' do
|
32
|
+
it 'should be created with an IO parameter' do
|
33
|
+
expect { ToTrace.new(destination) }.not_to raise_error
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'should react to all the notifications' do
|
37
|
+
instance = ToTrace.new(destination)
|
38
|
+
expect(instance.implements).to eq(Formatter::AllNotifications)
|
39
|
+
end
|
40
|
+
end # context
|
41
|
+
|
42
|
+
|
43
|
+
context 'Provided services:' do
|
44
|
+
# Default instantiation rule
|
45
|
+
subject { ToTrace.new(destination) }
|
46
|
+
|
47
|
+
# The expected event trace for the sample collection
|
48
|
+
let(:expected_trace) do
|
49
|
+
trace_details = <<-SNIPPET
|
50
|
+
on_collection
|
51
|
+
on_step
|
52
|
+
on_phrase
|
53
|
+
on_renderer
|
54
|
+
on_source
|
55
|
+
on_static_text
|
56
|
+
on_eol
|
57
|
+
on_static_text
|
58
|
+
on_eol
|
59
|
+
on_static_text
|
60
|
+
on_placeholder
|
61
|
+
on_static_text
|
62
|
+
on_eol
|
63
|
+
on_static_text
|
64
|
+
on_placeholder
|
65
|
+
on_static_text
|
66
|
+
on_eol
|
67
|
+
on_static_text
|
68
|
+
on_eol
|
69
|
+
on_renderer_end
|
70
|
+
on_step_end
|
71
|
+
on_step
|
72
|
+
on_phrase
|
73
|
+
on_renderer
|
74
|
+
on_source
|
75
|
+
on_static_text
|
76
|
+
on_placeholder
|
77
|
+
on_static_text
|
78
|
+
on_eol
|
79
|
+
on_static_text
|
80
|
+
on_placeholder
|
81
|
+
on_static_text
|
82
|
+
on_eol
|
83
|
+
on_static_text
|
84
|
+
on_placeholder
|
85
|
+
on_static_text
|
86
|
+
on_eol
|
87
|
+
on_static_text
|
88
|
+
on_placeholder
|
89
|
+
on_static_text
|
90
|
+
on_eol
|
91
|
+
on_static_text
|
92
|
+
on_placeholder
|
93
|
+
on_static_text
|
94
|
+
on_eol
|
95
|
+
on_static_text
|
96
|
+
on_placeholder
|
97
|
+
on_static_text
|
98
|
+
on_eol
|
99
|
+
on_eol
|
100
|
+
on_comment
|
101
|
+
on_eol
|
102
|
+
on_comment
|
103
|
+
on_eol
|
104
|
+
on_comment
|
105
|
+
on_eol
|
106
|
+
on_section
|
107
|
+
on_static_text
|
108
|
+
on_placeholder
|
109
|
+
on_static_text
|
110
|
+
on_eol
|
111
|
+
on_section_end
|
112
|
+
on_eol
|
113
|
+
on_comment
|
114
|
+
on_eol
|
115
|
+
on_comment
|
116
|
+
on_eol
|
117
|
+
on_comment
|
118
|
+
on_eol
|
119
|
+
on_section
|
120
|
+
on_static_text
|
121
|
+
on_placeholder
|
122
|
+
on_static_text
|
123
|
+
on_eol
|
124
|
+
on_section_end
|
125
|
+
on_static_text
|
126
|
+
on_eol
|
127
|
+
on_renderer_end
|
128
|
+
on_step_end
|
129
|
+
on_collection_end
|
130
|
+
SNIPPET
|
131
|
+
|
132
|
+
trace_details
|
133
|
+
end
|
134
|
+
|
135
|
+
|
136
|
+
it 'should render the trace event for a given macro-step collection' do
|
137
|
+
service = FormattingService.new
|
138
|
+
service.register(subject)
|
139
|
+
expect { service.start!(macro_coll) }.not_to raise_error
|
140
|
+
expect(subject.io.string).to eq(expected_trace)
|
141
|
+
end
|
142
|
+
end # context
|
143
|
+
end # describe
|
144
|
+
end # module
|
145
|
+
end # module
|
146
|
+
|
147
|
+
|
148
|
+
# End of file
|
@@ -39,9 +39,9 @@ SNIPPET
|
|
39
39
|
expect(singleton.macro_steps.size).to eq(1)
|
40
40
|
|
41
41
|
# Error case: inserting another macro with same phrase.
|
42
|
+
exc = Macros4Cuke::DuplicateMacroError
|
42
43
|
msg = "A macro-step with phrase '[enter my credentials]' already exists."
|
43
|
-
expect { singleton.add_macro(*args) }.to raise_error(
|
44
|
-
Macros4Cuke::DuplicateMacroError, msg)
|
44
|
+
expect { singleton.add_macro(*args) }.to raise_error(exc, msg)
|
45
45
|
end
|
46
46
|
|
47
47
|
it 'should return the rendition of a given macro-step' do
|
@@ -1,5 +1,4 @@
|
|
1
1
|
# File: macro-step_spec.rb
|
2
|
-
|
3
2
|
require_relative '../spec_helper'
|
4
3
|
|
5
4
|
# The class under test
|
@@ -50,29 +49,31 @@ SNIPPET
|
|
50
49
|
end
|
51
50
|
|
52
51
|
it 'should complain when entering the same macro again' do
|
52
|
+
txt = phrase1
|
53
|
+
substeps = m1_substeps
|
53
54
|
# Error case: trying to register another macro with same key/phrase.
|
54
|
-
|
55
|
+
exc = Macros4Cuke::DuplicateMacroError
|
55
56
|
msg = "A macro-step with phrase 'enter the credentials' already exists."
|
56
|
-
expect { world.add_macro(
|
57
|
-
error_type, msg)
|
57
|
+
expect { world.add_macro(txt, substeps, true) }.to raise_error(exc, msg)
|
58
58
|
end
|
59
59
|
|
60
60
|
it 'should complain macro uses no table and phrase is parameterless' do
|
61
61
|
# Error case: substeps have arguments,
|
62
62
|
# but the macro has no mechanism to pass the needed data.
|
63
|
-
|
63
|
+
txt = 'fill in the credentials'
|
64
|
+
substeps = m1_substeps
|
65
|
+
exc = Macros4Cuke::UnreachableSubstepArgument
|
64
66
|
msg = "The sub-step argument 'userid' does not appear in the phrase."
|
65
|
-
expect { world.add_macro(
|
66
|
-
Macros4Cuke::UnreachableSubstepArgument, msg)
|
67
|
+
expect { world.add_macro(txt, substeps, false) }.to raise_error(exc, msg)
|
67
68
|
end
|
68
69
|
end # context
|
69
70
|
|
70
71
|
context 'Invoking macro(s):' do
|
71
72
|
it 'should complain when invoking an unknown macro-step' do
|
72
73
|
phrase_unknown = 'dream of a perfect world'
|
74
|
+
exc = Macros4Cuke::UnknownMacroError
|
73
75
|
msg = "Unknown macro-step with phrase: 'dream of a perfect world'."
|
74
|
-
expect { world.invoke_macro(phrase_unknown) }.to raise_error(
|
75
|
-
Macros4Cuke::UnknownMacroError, msg)
|
76
|
+
expect { world.invoke_macro(phrase_unknown) }.to raise_error(exc, msg)
|
76
77
|
end
|
77
78
|
|
78
79
|
it "should call the 'steps' method with substeps and variables" do
|
@@ -37,17 +37,18 @@ SNIPPET
|
|
37
37
|
it 'should complain when a sub-step argument can never be assigned' do
|
38
38
|
phrase = sample_phrase
|
39
39
|
template = sample_template
|
40
|
+
exc = Macros4Cuke::UnreachableSubstepArgument
|
40
41
|
msg = "The sub-step argument 'password' does not appear in the phrase."
|
41
|
-
expect { MacroStep.new(phrase, template, false) }.to raise_error(
|
42
|
-
Macros4Cuke::UnreachableSubstepArgument, msg)
|
42
|
+
expect { MacroStep.new(phrase, template, false) }.to raise_error(exc, msg)
|
43
43
|
end
|
44
44
|
|
45
45
|
|
46
46
|
it 'should complain when an argument in phrase never occurs in substeps' do
|
47
47
|
phrase = 'enter my credentials as <foobar>'
|
48
|
+
exc = Macros4Cuke::UselessPhraseArgument
|
48
49
|
msg = "The phrase argument 'foobar' does not appear in a sub-step."
|
49
|
-
|
50
|
-
|
50
|
+
template = sample_template
|
51
|
+
expect { MacroStep.new(phrase, template, true) }.to raise_error(exc, msg)
|
51
52
|
end
|
52
53
|
|
53
54
|
it 'should know its phrase' do
|
@@ -114,20 +115,20 @@ SNIPPET
|
|
114
115
|
|
115
116
|
it 'should complain when an unknown variable is used' do
|
116
117
|
# Error case: there is no macro argument called <unknown>
|
117
|
-
|
118
|
+
exc = UnknownArgumentError
|
119
|
+
msg = "Unknown macro-step argument 'unknown'."
|
118
120
|
args = [ %w(unknown anything) ]
|
119
|
-
expect { subject.expand(phrase_instance, args) }.to raise_error(
|
120
|
-
UnknownArgumentError, error_message)
|
121
|
+
expect { subject.expand(phrase_instance, args) }.to raise_error(exc, msg)
|
121
122
|
end
|
122
123
|
|
123
124
|
|
124
125
|
it 'should complain when argument gets a value from phrase and table' do
|
125
126
|
# Error case: there is no macro argument called <unknown>
|
126
127
|
phrase = 'enter my credentials as "nobody"'
|
128
|
+
exc = AmbiguousArgumentValue
|
127
129
|
msg = "The macro argument 'userid' has value 'nobody' and 'someone'."
|
128
130
|
args = [ %w(userid someone), %w(password no-secret) ]
|
129
|
-
expect { subject.expand(phrase, args) }.to raise_error(
|
130
|
-
AmbiguousArgumentValue, msg)
|
131
|
+
expect { subject.expand(phrase, args) }.to raise_error(exc, msg)
|
131
132
|
end
|
132
133
|
|
133
134
|
|
@@ -1,38 +1,37 @@
|
|
1
|
-
# File: comment_spec.rb
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
module
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end #
|
35
|
-
end # module
|
36
|
-
|
37
|
-
|
38
|
-
# End of file
|
1
|
+
# File: comment_spec.rb
|
2
|
+
require_relative '../../spec_helper'
|
3
|
+
|
4
|
+
# Load the classes under test
|
5
|
+
require_relative '../../../lib/macros4cuke/templating/comment'
|
6
|
+
|
7
|
+
module Macros4Cuke
|
8
|
+
module Templating # Open this namespace to get rid of module qualifier prefixes
|
9
|
+
describe Comment do
|
10
|
+
let(:sample_text) { 'Some text' }
|
11
|
+
|
12
|
+
subject { Comment.new(sample_text) }
|
13
|
+
|
14
|
+
context 'Creation and initialization:' do
|
15
|
+
it 'should be created with a text' do
|
16
|
+
expect { Comment.new(sample_text) }.not_to raise_error
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should know its source text' do
|
20
|
+
expect(subject.source).to eq(sample_text)
|
21
|
+
end
|
22
|
+
|
23
|
+
end # context
|
24
|
+
|
25
|
+
context 'Provided services:' do
|
26
|
+
it 'should render tan empty text' do
|
27
|
+
context = double('fake_context')
|
28
|
+
locals = double('fake_locals')
|
29
|
+
|
30
|
+
expect(subject.render(context, locals)).to be_empty
|
31
|
+
end
|
32
|
+
end # context
|
33
|
+
end # describe
|
34
|
+
end # module
|
35
|
+
end # module
|
36
|
+
|
37
|
+
# End of file
|