cucumber_analytics 1.4.2 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/History.rdoc +7 -0
  2. data/README.rdoc +4 -0
  3. data/Rakefile +1 -1
  4. data/cucumber_analytics.gemspec +3 -1
  5. data/features/modeling/background_modeling.feature +27 -13
  6. data/features/modeling/background_output.feature +130 -0
  7. data/features/modeling/directory_modeling.feature +11 -6
  8. data/features/modeling/directory_output.feature +13 -0
  9. data/features/modeling/doc_string_modeling.feature +18 -11
  10. data/features/modeling/doc_string_output.feature +71 -0
  11. data/features/modeling/example_modeling.feature +30 -19
  12. data/features/modeling/example_output.feature +192 -0
  13. data/features/modeling/feature_file_modeling.feature +9 -4
  14. data/features/modeling/feature_file_output.feature +13 -0
  15. data/features/modeling/feature_modeling.feature +33 -20
  16. data/features/modeling/feature_output.feature +244 -0
  17. data/features/modeling/outline_modeling.feature +29 -16
  18. data/features/modeling/outline_output.feature +197 -0
  19. data/features/modeling/row_modeling.feature +9 -4
  20. data/features/modeling/row_output.feature +27 -0
  21. data/features/modeling/scenario_modeling.feature +27 -14
  22. data/features/modeling/scenario_output.feature +147 -0
  23. data/features/modeling/step_modeling.feature +13 -8
  24. data/features/modeling/step_output.feature +52 -0
  25. data/features/modeling/table_modeling.feature +9 -4
  26. data/features/modeling/table_output.feature +42 -0
  27. data/features/modeling/table_row_modeling.feature +9 -4
  28. data/features/modeling/table_row_output.feature +27 -0
  29. data/features/modeling/tag_modeling.feature +10 -5
  30. data/features/modeling/tag_output.feature +16 -0
  31. data/features/step_definitions/action_steps.rb +3 -0
  32. data/features/step_definitions/background_steps.rb +17 -4
  33. data/features/step_definitions/directory_steps.rb +11 -0
  34. data/features/step_definitions/doc_string_steps.rb +18 -15
  35. data/features/step_definitions/feature_file_steps.rb +12 -1
  36. data/features/step_definitions/feature_steps.rb +23 -6
  37. data/features/step_definitions/outline_steps.rb +70 -9
  38. data/features/step_definitions/step_steps.rb +9 -1
  39. data/features/step_definitions/table_steps.rb +35 -2
  40. data/features/step_definitions/tag_steps.rb +8 -0
  41. data/features/step_definitions/test_steps.rb +14 -3
  42. data/features/step_definitions/verification_steps.rb +9 -0
  43. data/features/support/env.rb +1 -0
  44. data/lib/cucumber_analytics/background.rb +12 -0
  45. data/lib/cucumber_analytics/directory.rb +5 -0
  46. data/lib/cucumber_analytics/doc_string.rb +22 -0
  47. data/lib/cucumber_analytics/example.rb +55 -0
  48. data/lib/cucumber_analytics/feature.rb +26 -0
  49. data/lib/cucumber_analytics/feature_element.rb +25 -1
  50. data/lib/cucumber_analytics/feature_file.rb +5 -0
  51. data/lib/cucumber_analytics/outline.rb +18 -0
  52. data/lib/cucumber_analytics/parsing.rb +3 -1
  53. data/lib/cucumber_analytics/row.rb +5 -0
  54. data/lib/cucumber_analytics/scenario.rb +13 -0
  55. data/lib/cucumber_analytics/step.rb +8 -0
  56. data/lib/cucumber_analytics/table.rb +21 -0
  57. data/lib/cucumber_analytics/table_row.rb +5 -0
  58. data/lib/cucumber_analytics/tag.rb +5 -0
  59. data/lib/cucumber_analytics/taggable.rb +4 -0
  60. data/lib/cucumber_analytics/test_element.rb +8 -0
  61. data/lib/cucumber_analytics/version.rb +1 -1
  62. data/spec/integration/background_integration_spec.rb +12 -0
  63. data/spec/integration/example_integration_spec.rb +21 -0
  64. data/spec/integration/feature_integration_spec.rb +29 -0
  65. data/spec/integration/outline_integration_spec.rb +22 -0
  66. data/spec/integration/scenario_integration_spec.rb +16 -0
  67. data/spec/integration/step_integration_spec.rb +20 -0
  68. data/spec/integration/table_integration_spec.rb +11 -0
  69. data/spec/unit/background_unit_spec.rb +28 -0
  70. data/spec/unit/directory_unit_spec.rb +12 -0
  71. data/spec/unit/doc_string_unit_spec.rb +43 -3
  72. data/spec/unit/example_unit_spec.rb +53 -0
  73. data/spec/unit/feature_element_unit_specs.rb +9 -2
  74. data/spec/unit/feature_file_unit_spec.rb +12 -0
  75. data/spec/unit/feature_unit_spec.rb +30 -0
  76. data/spec/unit/outline_unit_spec.rb +30 -0
  77. data/spec/unit/row_unit_spec.rb +19 -7
  78. data/spec/unit/scenario_unit_spec.rb +30 -0
  79. data/spec/unit/step_unit_spec.rb +25 -1
  80. data/spec/unit/table_row_unit_spec.rb +12 -0
  81. data/spec/unit/table_unit_spec.rb +25 -0
  82. data/spec/unit/tag_unit_spec.rb +12 -0
  83. metadata +165 -86
  84. checksums.yaml +0 -15
@@ -1,17 +1,19 @@
1
- Feature: Scenario Outline elements can be modeled.
1
+ Feature: Outline elements can be modeled.
2
2
 
3
3
 
4
4
  Acceptance criteria
5
5
 
6
- All conceptual pieces of a Scenario Outline can be modeled:
7
- 1. the outline's name
8
- 2. the outline's description
9
- 3. the outline's steps
10
- 4. the outline's tags
11
- 5. the outline's applied tags
12
- 6. the outline's example blocks
13
- 7. the outline's source line
14
- 8. the outline's raw element
6
+ 1. All conceptual pieces of an outline can be modeled:
7
+ - the outline's name
8
+ - the outline's description
9
+ - the outline's steps
10
+ - the outline's tags
11
+ - the outline's applied tags
12
+ - the outline's example blocks
13
+ - the outline's source line
14
+ - the outline's raw element
15
+
16
+ 2. Outlines can be outputted in a convenient form
15
17
 
16
18
 
17
19
  Background: Test file setup.
@@ -22,8 +24,11 @@ Feature: Scenario Outline elements can be modeled.
22
24
 
23
25
  @outline_tag
24
26
  Scenario Outline: The scenario outline's name.
25
- Some outline description
26
- Some more description
27
+
28
+ Some outline description.
29
+
30
+ Some more.
31
+ Even more.
27
32
 
28
33
  Given a <setup> step
29
34
  When an action step
@@ -52,9 +57,14 @@ Feature: Scenario Outline elements can be modeled.
52
57
  | name | The scenario outline's name. |
53
58
 
54
59
  Scenario: The outline description is modeled.
55
- Then the test descriptive lines are as follows:
56
- | Some outline description |
57
- | Some more description |
60
+ Then the test has the following description:
61
+ """
62
+
63
+ Some outline description.
64
+
65
+ Some more.
66
+ Even more.
67
+ """
58
68
 
59
69
  Scenario: The outline steps are modeled.
60
70
  Then the test steps are as follows:
@@ -75,8 +85,11 @@ Feature: Scenario Outline elements can be modeled.
75
85
  | example 1 |
76
86
  | example 2 |
77
87
 
88
+ Scenario: Convenient output of an an outline
89
+ Then the outline has convenient output
90
+
78
91
  Scenario Outline: Outline models pass all other specifications
79
- Exact specifications detailing the API for Scenario Outline models.
92
+ Exact specifications detailing the API for outline models.
80
93
  Given that there are "<additional specifications>" detailing models
81
94
  When the corresponding specifications are run
82
95
  Then all of those specifications are met
@@ -0,0 +1,197 @@
1
+ Feature: Outputting outline elements
2
+
3
+ The output of an element model is a representation of the element as it would
4
+ appear in gherkin.
5
+
6
+
7
+ Scenario: Output of an outline that does not have a name
8
+ Given an outline element based on the following gherkin:
9
+ """
10
+ Scenario Outline:
11
+ """
12
+ When it is outputted
13
+ Then the following text is provided:
14
+ """
15
+ Scenario Outline:
16
+ """
17
+
18
+ Scenario: Output of an outline that does have a name
19
+ Given an outline element based on the following gherkin:
20
+ """
21
+ Scenario Outline: with a name
22
+ """
23
+ When it is outputted
24
+ Then the following text is provided:
25
+ """
26
+ Scenario Outline: with a name
27
+ """
28
+
29
+ Scenario: Output of an outline that does have tags
30
+ Given an outline element based on the following gherkin:
31
+ """
32
+ @tag1@tag2
33
+ @tag3
34
+ Scenario Outline:
35
+ """
36
+ When it is outputted
37
+ Then the following text is provided:
38
+ """
39
+ @tag1 @tag2 @tag3
40
+ Scenario Outline:
41
+ """
42
+
43
+ Scenario: Output of an outline that has a description, no first line buffer
44
+ Given an outline element based on the following gherkin:
45
+ """
46
+ Scenario Outline:
47
+ Some description.
48
+ Some more description.
49
+ """
50
+ When it is outputted
51
+ Then the following text is provided:
52
+ """
53
+ Scenario Outline:
54
+
55
+ Some description.
56
+ Some more description.
57
+ """
58
+
59
+ Scenario: Output of an outline that has a description, first line is blank
60
+ Given an outline element based on the following gherkin:
61
+ """
62
+ Scenario Outline:
63
+
64
+ Some description.
65
+ Some more description.
66
+ """
67
+ When it is outputted
68
+ Then the following text is provided:
69
+ """
70
+ Scenario Outline:
71
+
72
+ Some description.
73
+ Some more description.
74
+ """
75
+
76
+ Scenario: Output of an outline that has a description, first line is only whitespace
77
+ Given an outline element based on the following gherkin:
78
+ """
79
+ Scenario Outline:
80
+
81
+ Some description.
82
+ Some more description.
83
+ """
84
+ When it is outputted
85
+ Then the following text is provided:
86
+ """
87
+ Scenario Outline:
88
+
89
+ Some description.
90
+ Some more description.
91
+ """
92
+
93
+ Scenario: Output of an outline that has steps
94
+ Given an outline element based on the following gherkin:
95
+ """
96
+ Scenario Outline:
97
+ * a step
98
+ |value|
99
+ * another step
100
+ \"\"\"
101
+ some string
102
+ \"\"\"
103
+ """
104
+ When it is outputted
105
+ Then the following text is provided:
106
+ """
107
+ Scenario Outline:
108
+ * a step
109
+ | value |
110
+ * another step
111
+ \"\"\"
112
+ some string
113
+ \"\"\"
114
+ """
115
+
116
+ Scenario: Output of an outline that has examples
117
+ Given an outline element based on the following gherkin:
118
+ """
119
+ Scenario Outline:
120
+ * a <value> step
121
+ Examples:
122
+ | value |
123
+ | x |
124
+ @example_tag
125
+ Examples:
126
+ | value |
127
+ | y |
128
+ """
129
+ When it is outputted
130
+ Then the following text is provided:
131
+ """
132
+ Scenario Outline:
133
+ * a <value> step
134
+
135
+ Examples:
136
+ | value |
137
+ | x |
138
+
139
+ @example_tag
140
+ Examples:
141
+ | value |
142
+ | y |
143
+ """
144
+
145
+ Scenario: Output of an outline that contains all possible parts
146
+ Given an outline element based on the following gherkin:
147
+ """
148
+ @tag1@tag2
149
+ @tag3
150
+ Scenario Outline: An outline with everything it could have
151
+ Some description.
152
+ Some more description.
153
+ * a step
154
+ |value|
155
+ * a <value> step
156
+ \"\"\"
157
+ some string
158
+ \"\"\"
159
+ Examples:
160
+ Some description.
161
+ Some more description.
162
+ | value |
163
+ | x |
164
+ @example_tag
165
+ Examples:
166
+ | value |
167
+ | y |
168
+ """
169
+ When it is outputted
170
+ Then the following text is provided:
171
+ """
172
+ @tag1 @tag2 @tag3
173
+ Scenario Outline: An outline with everything it could have
174
+
175
+ Some description.
176
+ Some more description.
177
+
178
+ * a step
179
+ | value |
180
+ * a <value> step
181
+ \"\"\"
182
+ some string
183
+ \"\"\"
184
+
185
+ Examples:
186
+
187
+ Some description.
188
+ Some more description.
189
+
190
+ | value |
191
+ | x |
192
+
193
+ @example_tag
194
+ Examples:
195
+ | value |
196
+ | y |
197
+ """
@@ -3,10 +3,12 @@ Feature: Row elements can be modeled.
3
3
 
4
4
  Acceptance criteria
5
5
 
6
- All conceptual pieces of a Row can be modeled:
7
- 1. the row's source line
8
- 2. the row's cells
9
- 3. the row's raw element
6
+ 1. All conceptual pieces of a Row can be modeled:
7
+ - the row's source line
8
+ - the row's cells
9
+ - the row's raw element
10
+
11
+ 2. Rows can be outputted in a convenient form
10
12
 
11
13
 
12
14
  Background: Test file setup.
@@ -61,6 +63,9 @@ Feature: Row elements can be modeled.
61
63
  And the test example block "2" row "2" cells are as follows:
62
64
  | a |
63
65
 
66
+ Scenario: Convenient output of a row
67
+ Then the row has convenient output
68
+
64
69
  Scenario Outline: Row models pass all other specifications
65
70
  Exact specifications detailing the API for Row models.
66
71
  Given that there are "<additional specifications>" detailing models
@@ -0,0 +1,27 @@
1
+ Feature: Outputting row elements
2
+
3
+ The output of an element model is a representation of the element as it would
4
+ appear in gherkin.
5
+
6
+
7
+ Scenario: Output of a row that has one cell
8
+ Given a row element based on the following gherkin:
9
+ """
10
+ |value|
11
+ """
12
+ When it is outputted
13
+ Then the following text is provided:
14
+ """
15
+ | value |
16
+ """
17
+
18
+ Scenario: Output of a row that has multiple cells
19
+ Given a row element based on the following gherkin:
20
+ """
21
+ |value|another_value|
22
+ """
23
+ When it is outputted
24
+ Then the following text is provided:
25
+ """
26
+ | value | another_value |
27
+ """
@@ -3,14 +3,16 @@ Feature: Scenario elements can be modeled.
3
3
 
4
4
  Acceptance criteria
5
5
 
6
- All conceptual pieces of a Scenario can be modeled:
7
- 1. the scenario's name
8
- 2. the scenario's description
9
- 3. the scenario's steps
10
- 4. the scenario's tags
11
- 5. the scenario's applied tags
12
- 6. the scenario's source line
13
- 7. the scenario's raw element
6
+ 1. All conceptual pieces of a scenario can be modeled:
7
+ - the scenario's name
8
+ - the scenario's description
9
+ - the scenario's steps
10
+ - the scenario's tags
11
+ - the scenario's applied tags
12
+ - the scenario's source line
13
+ - the scenario's raw element
14
+
15
+ 2. Scenarios can be outputted in a convenient form
14
16
 
15
17
 
16
18
  Background: Test file setup.
@@ -22,8 +24,11 @@ Feature: Scenario elements can be modeled.
22
24
  @a_tag
23
25
  @another_tag
24
26
  Scenario:The first scenario's name.
25
- Some scenario description
26
- Some more description
27
+
28
+ Some scenario description.
29
+
30
+ Some more.
31
+ Even more.
27
32
 
28
33
  Given a setup step
29
34
  When an action step
@@ -45,9 +50,14 @@ Feature: Scenario elements can be modeled.
45
50
  | name | The first scenario's name. |
46
51
 
47
52
  Scenario: The scenario description is modeled.
48
- Then the test descriptive lines are as follows:
49
- | Some scenario description |
50
- | Some more description |
53
+ Then the test has the following description:
54
+ """
55
+
56
+ Some scenario description.
57
+
58
+ Some more.
59
+ Even more.
60
+ """
51
61
 
52
62
  Scenario: The scenario steps are modeled.
53
63
  Then the test steps are as follows:
@@ -64,8 +74,11 @@ Feature: Scenario elements can be modeled.
64
74
  Then the test is found to have the following applied tags:
65
75
  | @a_feature_level_tag |
66
76
 
77
+ Scenario: Convenient output of a scenario
78
+ Then the scenario has convenient output
79
+
67
80
  Scenario Outline: Scenario models pass all other specifications
68
- Exact specifications detailing the API for Scenario models.
81
+ Exact specifications detailing the API for scenario models.
69
82
  Given that there are "<additional specifications>" detailing models
70
83
  When the corresponding specifications are run
71
84
  Then all of those specifications are met
@@ -0,0 +1,147 @@
1
+ Feature: Outputting scenario elements
2
+
3
+ The output of an element model is a representation of the element as it would
4
+ appear in gherkin.
5
+
6
+
7
+ Scenario: Output of a scenario that does not have a name
8
+ Given a scenario element based on the following gherkin:
9
+ """
10
+ Scenario:
11
+ """
12
+ When it is outputted
13
+ Then the following text is provided:
14
+ """
15
+ Scenario:
16
+ """
17
+
18
+ Scenario: Output of a scenario that does have a name
19
+ Given a scenario element based on the following gherkin:
20
+ """
21
+ Scenario: with a name
22
+ """
23
+ When it is outputted
24
+ Then the following text is provided:
25
+ """
26
+ Scenario: with a name
27
+ """
28
+
29
+ Scenario: Output of a scenario that has tags
30
+ Given a scenario element based on the following gherkin:
31
+ """
32
+ @tag1@tag2
33
+ @tag3
34
+ Scenario:
35
+ """
36
+ When it is outputted
37
+ Then the following text is provided:
38
+ """
39
+ @tag1 @tag2 @tag3
40
+ Scenario:
41
+ """
42
+
43
+ Scenario: Output of a scenario that has a description, no first line buffer
44
+ Given a scenario element based on the following gherkin:
45
+ """
46
+ Scenario:
47
+ Some description.
48
+ Some more description.
49
+ """
50
+ When it is outputted
51
+ Then the following text is provided:
52
+ """
53
+ Scenario:
54
+
55
+ Some description.
56
+ Some more description.
57
+ """
58
+
59
+ Scenario: Output of a scenario that has a description, first line is blank
60
+ Given a scenario element based on the following gherkin:
61
+ """
62
+ Scenario:
63
+
64
+ Some description.
65
+ Some more description.
66
+ """
67
+ When it is outputted
68
+ Then the following text is provided:
69
+ """
70
+ Scenario:
71
+
72
+ Some description.
73
+ Some more description.
74
+ """
75
+
76
+ Scenario: Output of a scenario that has a description, first line is only whitespace
77
+ Given a scenario element based on the following gherkin:
78
+ """
79
+ Scenario:
80
+
81
+ Some description.
82
+ Some more description.
83
+ """
84
+ When it is outputted
85
+ Then the following text is provided:
86
+ """
87
+ Scenario:
88
+
89
+ Some description.
90
+ Some more description.
91
+ """
92
+
93
+ Scenario: Output of a scenario that has steps
94
+ Given a scenario element based on the following gherkin:
95
+ """
96
+ Scenario:
97
+ * a step
98
+ |value|
99
+ * another step
100
+ \"\"\"
101
+ some string
102
+ \"\"\"
103
+ """
104
+ When it is outputted
105
+ Then the following text is provided:
106
+ """
107
+ Scenario:
108
+ * a step
109
+ | value |
110
+ * another step
111
+ \"\"\"
112
+ some string
113
+ \"\"\"
114
+ """
115
+
116
+ Scenario: Output of a scenario that contains all possible parts
117
+ Given a scenario element based on the following gherkin:
118
+ """
119
+ @tag1@tag2
120
+ @tag3
121
+ Scenario: A scenario with everything it could have
122
+ Including a description
123
+ and then some.
124
+
125
+ * a step
126
+ |value|
127
+ * another step
128
+ \"\"\"
129
+ some string
130
+ \"\"\"
131
+ """
132
+ When it is outputted
133
+ Then the following text is provided:
134
+ """
135
+ @tag1 @tag2 @tag3
136
+ Scenario: A scenario with everything it could have
137
+
138
+ Including a description
139
+ and then some.
140
+
141
+ * a step
142
+ | value |
143
+ * another step
144
+ \"\"\"
145
+ some string
146
+ \"\"\"
147
+ """