cucumber_analytics 1.1.1 → 1.2.0
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 +8 -8
- data/.simplecov +5 -1
- data/History.rdoc +16 -5
- data/README.rdoc +5 -0
- data/Rakefile +6 -1
- data/features/modeling/background_modeling.feature +5 -1
- data/features/modeling/directory_modeling.feature +1 -1
- data/features/modeling/doc_string_modeling.feature +5 -1
- data/features/modeling/example_modeling.feature +5 -1
- data/features/modeling/feature_file_modeling.feature +1 -1
- data/features/modeling/feature_modeling.feature +15 -10
- data/features/modeling/outline_modeling.feature +6 -1
- data/features/modeling/row_modeling.feature +5 -1
- data/features/modeling/scenario_modeling.feature +6 -1
- data/features/modeling/step_modeling.feature +6 -1
- data/features/modeling/table_modeling.feature +5 -1
- data/features/modeling/tag_modeling.feature +51 -0
- data/features/step_definitions/background_steps.rb +12 -0
- data/features/step_definitions/doc_string_steps.rb +10 -0
- data/features/step_definitions/feature_steps.rb +14 -5
- data/features/step_definitions/outline_steps.rb +31 -15
- data/features/step_definitions/spec_steps.rb +1 -1
- data/features/step_definitions/step_steps.rb +10 -0
- data/features/step_definitions/table_steps.rb +11 -0
- data/features/step_definitions/tag_steps.rb +53 -0
- data/features/step_definitions/test_steps.rb +20 -8
- data/features/step_definitions/world_steps.rb +16 -12
- data/lib/cucumber_analytics/background.rb +10 -0
- data/lib/cucumber_analytics/doc_string.rb +12 -0
- data/lib/cucumber_analytics/example.rb +1 -0
- data/lib/cucumber_analytics/feature.rb +2 -1
- data/lib/cucumber_analytics/feature_element.rb +2 -0
- data/lib/cucumber_analytics/outline.rb +1 -0
- data/lib/cucumber_analytics/raw.rb +20 -0
- data/lib/cucumber_analytics/row.rb +3 -0
- data/lib/cucumber_analytics/scenario.rb +1 -0
- data/lib/cucumber_analytics/step.rb +3 -0
- data/lib/cucumber_analytics/table.rb +8 -0
- data/lib/cucumber_analytics/tag.rb +59 -0
- data/lib/cucumber_analytics/taggable.rb +15 -0
- data/lib/cucumber_analytics/version.rb +1 -1
- data/lib/cucumber_analytics/world.rb +5 -0
- data/lib/cucumber_analytics.rb +2 -0
- data/spec/integration/example_integration_spec.rb +4 -1
- data/spec/integration/feature_integration_spec.rb +11 -8
- data/spec/integration/outline_integration_spec.rb +4 -1
- data/spec/integration/scenario_integration_spec.rb +4 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/unit/background_unit_spec.rb +1 -0
- data/spec/unit/doc_string_unit_spec.rb +1 -0
- data/spec/unit/example_unit_spec.rb +1 -0
- data/spec/unit/feature_unit_spec.rb +12 -0
- data/spec/unit/outline_unit_spec.rb +1 -0
- data/spec/unit/raw_element_unit_specs.rb +24 -0
- data/spec/unit/raw_unit_spec.rb +25 -0
- data/spec/unit/row_unit_spec.rb +1 -0
- data/spec/unit/scenario_unit_spec.rb +1 -0
- data/spec/unit/step_unit_spec.rb +1 -0
- data/spec/unit/table_unit_spec.rb +1 -0
- data/spec/unit/tag_unit_spec.rb +39 -0
- data/spec/unit/taggable_unit_spec.rb +22 -7
- data/spec/unit/tagged_element_unit_specs.rb +22 -7
- data/spec/unit/world_unit_spec.rb +3 -2
- metadata +14 -2
data/spec/unit/step_unit_spec.rb
CHANGED
@@ -10,6 +10,7 @@ describe 'Step, Unit' do
|
|
10
10
|
it_should_behave_like 'a bare bones element', clazz
|
11
11
|
it_should_behave_like 'a prepopulated element', clazz
|
12
12
|
it_should_behave_like 'a sourced element', clazz
|
13
|
+
it_should_behave_like 'a raw element', clazz
|
13
14
|
|
14
15
|
before(:each) do
|
15
16
|
@step = clazz.new
|
@@ -9,6 +9,7 @@ describe 'Table, Unit' do
|
|
9
9
|
it_should_behave_like 'a nested element', clazz
|
10
10
|
it_should_behave_like 'a bare bones element', clazz
|
11
11
|
it_should_behave_like 'a prepopulated element', clazz
|
12
|
+
it_should_behave_like 'a raw element', clazz
|
12
13
|
|
13
14
|
it 'can be parsed from stand alone text' do
|
14
15
|
source = '| a table |'
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
SimpleCov.command_name('Tag') unless RUBY_VERSION.to_s < '1.9.0'
|
4
|
+
|
5
|
+
describe 'Tag, Unit' do
|
6
|
+
|
7
|
+
clazz = CucumberAnalytics::Tag
|
8
|
+
|
9
|
+
it_should_behave_like 'a nested element', clazz
|
10
|
+
it_should_behave_like 'a bare bones element', clazz
|
11
|
+
it_should_behave_like 'a prepopulated element', clazz
|
12
|
+
it_should_behave_like 'a sourced element', clazz
|
13
|
+
it_should_behave_like 'a raw element', clazz
|
14
|
+
|
15
|
+
|
16
|
+
it 'can be parsed from stand alone text' do
|
17
|
+
source = '@a_tag'
|
18
|
+
|
19
|
+
expect { @element = clazz.new(source) }.to_not raise_error
|
20
|
+
@element.name.should == '@a_tag'
|
21
|
+
end
|
22
|
+
|
23
|
+
before(:each) do
|
24
|
+
@element = clazz.new
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
it 'has a name' do
|
29
|
+
@element.should respond_to(:name)
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'can get and set its name' do
|
33
|
+
@element.name = :some_name
|
34
|
+
@element.name.should == :some_name
|
35
|
+
@element.name = :some_other_name
|
36
|
+
@element.name.should == :some_other_name
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -19,45 +19,60 @@ describe 'Taggable, Unit' do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
it 'has tags
|
22
|
+
it 'has tags' do
|
23
23
|
@element.should respond_to(:tags)
|
24
|
+
@element.should respond_to(:tag_elements)
|
24
25
|
end
|
25
26
|
|
26
|
-
it 'can get and set its tags
|
27
|
+
it 'can get and set its tags' do
|
27
28
|
@element.tags = :some_tags
|
28
29
|
@element.tags.should == :some_tags
|
29
30
|
@element.tags = :some_other_tags
|
30
31
|
@element.tags.should == :some_other_tags
|
32
|
+
|
33
|
+
@element.tag_elements = :some_tag_elements
|
34
|
+
@element.tag_elements.should == :some_tag_elements
|
35
|
+
@element.tag_elements = :some_other_tag_elements
|
36
|
+
@element.tag_elements.should == :some_other_tag_elements
|
31
37
|
end
|
32
38
|
|
33
|
-
it 'has applied tags
|
39
|
+
it 'has applied tags' do
|
34
40
|
@element.should respond_to(:applied_tags)
|
41
|
+
@element.should respond_to(:applied_tag_elements)
|
35
42
|
end
|
36
43
|
|
37
|
-
it 'inherits its applied tags from its ancestors
|
44
|
+
it 'inherits its applied tags from its ancestors' do
|
45
|
+
all_parent_tag_elements = [:parent_tag_element_1, :parent_tag_element_2, :grandparent_tag_element_1]
|
38
46
|
all_parent_tags = ['@parent_tag_1', '@parent_tag_2', '@grandparent_tag_1']
|
39
|
-
parent = double(:all_tags => all_parent_tags)
|
47
|
+
parent = double(:all_tags => all_parent_tags, :all_tag_elements => all_parent_tag_elements)
|
40
48
|
|
41
49
|
@element.parent_element = parent
|
42
50
|
|
43
51
|
@element.applied_tags.should == all_parent_tags
|
52
|
+
@element.applied_tag_elements.should == all_parent_tag_elements
|
44
53
|
end
|
45
54
|
|
46
|
-
it 'knows all of its applicable tags
|
55
|
+
it 'knows all of its applicable tags' do
|
56
|
+
all_parent_tag_elements = [:parent_tag_element_1, :parent_tag_element_2, :grandparent_tag_element_1]
|
47
57
|
all_parent_tags = ['@parent_tag_1', '@parent_tag_2', '@grandparent_tag_1']
|
48
58
|
own_tags = ['@tag_1', '@tag_2']
|
49
|
-
|
59
|
+
own_tag_elements = [:tag_element_1, :tag_element_2]
|
60
|
+
|
61
|
+
parent = double(:all_tags => all_parent_tags, :all_tag_elements => all_parent_tag_elements)
|
50
62
|
|
51
63
|
@element.parent_element = parent
|
52
64
|
@element.tags = own_tags
|
65
|
+
@element.tag_elements = own_tag_elements
|
53
66
|
|
54
67
|
@element.all_tags.should == all_parent_tags + own_tags
|
68
|
+
@element.all_tag_elements.should == all_parent_tag_elements + own_tag_elements
|
55
69
|
end
|
56
70
|
|
57
71
|
it 'may have no applied tags' do
|
58
72
|
@element.parent_element = :not_a_tagged_object
|
59
73
|
|
60
74
|
@element.applied_tags.should == []
|
75
|
+
@element.applied_tag_elements.should == []
|
61
76
|
end
|
62
77
|
|
63
78
|
end
|
@@ -6,43 +6,58 @@ shared_examples_for 'a tagged element' do |clazz|
|
|
6
6
|
@element = clazz.new
|
7
7
|
end
|
8
8
|
|
9
|
-
it 'has tags
|
9
|
+
it 'has tags' do
|
10
10
|
@element.should respond_to(:tags)
|
11
|
+
@element.should respond_to(:tag_elements)
|
11
12
|
end
|
12
13
|
|
13
|
-
it 'can get and set its tags
|
14
|
+
it 'can get and set its tags' do
|
14
15
|
@element.tags = :some_tags
|
15
16
|
@element.tags.should == :some_tags
|
16
17
|
@element.tags = :some_other_tags
|
17
18
|
@element.tags.should == :some_other_tags
|
19
|
+
|
20
|
+
@element.tag_elements = :some_tag_elements
|
21
|
+
@element.tag_elements.should == :some_tag_elements
|
22
|
+
@element.tag_elements = :some_other_tag_elements
|
23
|
+
@element.tag_elements.should == :some_other_tag_elements
|
18
24
|
end
|
19
25
|
|
20
26
|
it 'starts with no tags' do
|
21
27
|
@element.tags.should == []
|
28
|
+
@element.tag_elements.should == []
|
22
29
|
end
|
23
30
|
|
24
|
-
it 'has applied tags
|
31
|
+
it 'has applied tags' do
|
25
32
|
@element.should respond_to(:applied_tags)
|
33
|
+
@element.should respond_to(:applied_tag_elements)
|
26
34
|
end
|
27
35
|
|
28
|
-
it 'inherits its applied tags from its ancestors
|
36
|
+
it 'inherits its applied tags from its ancestors' do
|
37
|
+
all_parent_tag_elements = [:parent_tag_element_1, :parent_tag_element_2, :grandparent_tag_element_1]
|
29
38
|
all_parent_tags = ['@parent_tag_1', '@parent_tag_2', '@grandparent_tag_1']
|
30
|
-
parent = double(:all_tags => all_parent_tags)
|
39
|
+
parent = double(:all_tags => all_parent_tags, :all_tag_elements => all_parent_tag_elements)
|
31
40
|
|
32
41
|
@element.parent_element = parent
|
33
42
|
|
34
43
|
@element.applied_tags.should == all_parent_tags
|
44
|
+
@element.applied_tag_elements.should == all_parent_tag_elements
|
35
45
|
end
|
36
46
|
|
37
|
-
it 'knows all of its applicable tags
|
47
|
+
it 'knows all of its applicable tags' do
|
48
|
+
all_parent_tag_elements = [:parent_tag_element_1, :parent_tag_element_2, :grandparent_tag_element_1]
|
38
49
|
all_parent_tags = ['@parent_tag_1', '@parent_tag_2', '@grandparent_tag_1']
|
39
50
|
own_tags = ['@tag_1', '@tag_2']
|
40
|
-
|
51
|
+
own_tag_elements = [:tag_element_1, :tag_element_2]
|
52
|
+
|
53
|
+
parent = double(:all_tags => all_parent_tags, :all_tag_elements => all_parent_tag_elements)
|
41
54
|
|
42
55
|
@element.parent_element = parent
|
43
56
|
@element.tags = own_tags
|
57
|
+
@element.tag_elements = own_tag_elements
|
44
58
|
|
45
59
|
@element.all_tags.should == all_parent_tags + own_tags
|
60
|
+
@element.all_tag_elements.should == all_parent_tag_elements + own_tag_elements
|
46
61
|
end
|
47
62
|
|
48
63
|
end
|
@@ -134,10 +134,11 @@ describe 'World, Unit' do
|
|
134
134
|
end
|
135
135
|
|
136
136
|
it 'can collect tags from containers' do
|
137
|
-
nested_container = double(:tags => @set_2)
|
138
|
-
container = double(:tags => @set_1, :contains => [nested_container])
|
137
|
+
nested_container = double(:tags => @set_2, :tag_elements => @set_2)
|
138
|
+
container = double(:tags => @set_1, :tag_elements => @set_1, :contains => [nested_container])
|
139
139
|
|
140
140
|
@world.tags_in(container).should =~ (@set_1 + @set_2)
|
141
|
+
@world.tag_elements_in(container).should =~ (@set_1 + @set_2)
|
141
142
|
end
|
142
143
|
|
143
144
|
it 'can collect directories from containers' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber_analytics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kessler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gherkin
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- features/modeling/scenario_modeling.feature
|
115
115
|
- features/modeling/step_modeling.feature
|
116
116
|
- features/modeling/table_modeling.feature
|
117
|
+
- features/modeling/tag_modeling.feature
|
117
118
|
- features/step_definitions/background_steps.rb
|
118
119
|
- features/step_definitions/directory_steps.rb
|
119
120
|
- features/step_definitions/doc_string_steps.rb
|
@@ -124,6 +125,7 @@ files:
|
|
124
125
|
- features/step_definitions/spec_steps.rb
|
125
126
|
- features/step_definitions/step_steps.rb
|
126
127
|
- features/step_definitions/table_steps.rb
|
128
|
+
- features/step_definitions/tag_steps.rb
|
127
129
|
- features/step_definitions/test_steps.rb
|
128
130
|
- features/step_definitions/world_steps.rb
|
129
131
|
- features/support/env.rb
|
@@ -139,11 +141,13 @@ files:
|
|
139
141
|
- lib/cucumber_analytics/feature_file.rb
|
140
142
|
- lib/cucumber_analytics/outline.rb
|
141
143
|
- lib/cucumber_analytics/parsing.rb
|
144
|
+
- lib/cucumber_analytics/raw.rb
|
142
145
|
- lib/cucumber_analytics/row.rb
|
143
146
|
- lib/cucumber_analytics/scenario.rb
|
144
147
|
- lib/cucumber_analytics/sourceable.rb
|
145
148
|
- lib/cucumber_analytics/step.rb
|
146
149
|
- lib/cucumber_analytics/table.rb
|
150
|
+
- lib/cucumber_analytics/tag.rb
|
147
151
|
- lib/cucumber_analytics/taggable.rb
|
148
152
|
- lib/cucumber_analytics/test_element.rb
|
149
153
|
- lib/cucumber_analytics/version.rb
|
@@ -172,12 +176,15 @@ files:
|
|
172
176
|
- spec/unit/outline_unit_spec.rb
|
173
177
|
- spec/unit/parsing_unit_spec.rb
|
174
178
|
- spec/unit/prepopulated_unit_specs.rb
|
179
|
+
- spec/unit/raw_element_unit_specs.rb
|
180
|
+
- spec/unit/raw_unit_spec.rb
|
175
181
|
- spec/unit/row_unit_spec.rb
|
176
182
|
- spec/unit/scenario_unit_spec.rb
|
177
183
|
- spec/unit/sourceable_unit_spec.rb
|
178
184
|
- spec/unit/sourced_element_unit_specs.rb
|
179
185
|
- spec/unit/step_unit_spec.rb
|
180
186
|
- spec/unit/table_unit_spec.rb
|
187
|
+
- spec/unit/tag_unit_spec.rb
|
181
188
|
- spec/unit/taggable_unit_spec.rb
|
182
189
|
- spec/unit/tagged_element_unit_specs.rb
|
183
190
|
- spec/unit/test_element_unit_spec.rb
|
@@ -227,6 +234,7 @@ test_files:
|
|
227
234
|
- features/modeling/scenario_modeling.feature
|
228
235
|
- features/modeling/step_modeling.feature
|
229
236
|
- features/modeling/table_modeling.feature
|
237
|
+
- features/modeling/tag_modeling.feature
|
230
238
|
- features/step_definitions/background_steps.rb
|
231
239
|
- features/step_definitions/directory_steps.rb
|
232
240
|
- features/step_definitions/doc_string_steps.rb
|
@@ -237,6 +245,7 @@ test_files:
|
|
237
245
|
- features/step_definitions/spec_steps.rb
|
238
246
|
- features/step_definitions/step_steps.rb
|
239
247
|
- features/step_definitions/table_steps.rb
|
248
|
+
- features/step_definitions/tag_steps.rb
|
240
249
|
- features/step_definitions/test_steps.rb
|
241
250
|
- features/step_definitions/world_steps.rb
|
242
251
|
- features/support/env.rb
|
@@ -265,12 +274,15 @@ test_files:
|
|
265
274
|
- spec/unit/outline_unit_spec.rb
|
266
275
|
- spec/unit/parsing_unit_spec.rb
|
267
276
|
- spec/unit/prepopulated_unit_specs.rb
|
277
|
+
- spec/unit/raw_element_unit_specs.rb
|
278
|
+
- spec/unit/raw_unit_spec.rb
|
268
279
|
- spec/unit/row_unit_spec.rb
|
269
280
|
- spec/unit/scenario_unit_spec.rb
|
270
281
|
- spec/unit/sourceable_unit_spec.rb
|
271
282
|
- spec/unit/sourced_element_unit_specs.rb
|
272
283
|
- spec/unit/step_unit_spec.rb
|
273
284
|
- spec/unit/table_unit_spec.rb
|
285
|
+
- spec/unit/tag_unit_spec.rb
|
274
286
|
- spec/unit/taggable_unit_spec.rb
|
275
287
|
- spec/unit/tagged_element_unit_specs.rb
|
276
288
|
- spec/unit/test_element_unit_spec.rb
|