cuke_modeler 3.27.0 → 3.28.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 +4 -4
- data/CHANGELOG.md +579 -572
- data/LICENSE.txt +22 -22
- data/README.md +135 -135
- data/cuke_modeler.gemspec +59 -59
- data/lib/cuke_modeler/adapters/gherkin_10_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_11_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_12_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_13_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_14_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_15_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_16_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_17_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_18_adapter.rb +27 -27
- data/lib/cuke_modeler/adapters/gherkin_19_adapter.rb +64 -64
- data/lib/cuke_modeler/adapters/gherkin_20_adapter.rb +359 -359
- data/lib/cuke_modeler/adapters/gherkin_21_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_22_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_23_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_24_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_25_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_26_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_27_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_28_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_29_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_30_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_31_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_32_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_33_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_34_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_35_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_36_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_37_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_38_adapter.rb +13 -0
- data/lib/cuke_modeler/adapters/gherkin_9_adapter.rb +375 -375
- data/lib/cuke_modeler/adapters/gherkin_base_adapter.rb +17 -17
- data/lib/cuke_modeler/containing.rb +105 -105
- data/lib/cuke_modeler/described.rb +71 -71
- data/lib/cuke_modeler/models/background.rb +122 -122
- data/lib/cuke_modeler/models/cell.rb +88 -88
- data/lib/cuke_modeler/models/comment.rb +82 -82
- data/lib/cuke_modeler/models/directory.rb +143 -143
- data/lib/cuke_modeler/models/doc_string.rb +104 -104
- data/lib/cuke_modeler/models/example.rb +274 -274
- data/lib/cuke_modeler/models/feature.rb +200 -200
- data/lib/cuke_modeler/models/feature_file.rb +116 -116
- data/lib/cuke_modeler/models/model.rb +87 -87
- data/lib/cuke_modeler/models/outline.rb +145 -145
- data/lib/cuke_modeler/models/row.rb +104 -104
- data/lib/cuke_modeler/models/rule.rb +162 -162
- data/lib/cuke_modeler/models/scenario.rb +128 -128
- data/lib/cuke_modeler/models/step.rb +178 -178
- data/lib/cuke_modeler/models/table.rb +117 -117
- data/lib/cuke_modeler/models/tag.rb +75 -75
- data/lib/cuke_modeler/named.rb +26 -26
- data/lib/cuke_modeler/nested.rb +61 -61
- data/lib/cuke_modeler/parsed.rb +24 -24
- data/lib/cuke_modeler/parsing.rb +208 -208
- data/lib/cuke_modeler/sourceable.rb +29 -29
- data/lib/cuke_modeler/stepped.rb +34 -34
- data/lib/cuke_modeler/taggable.rb +57 -57
- data/lib/cuke_modeler/version.rb +4 -4
- data/lib/cuke_modeler.rb +32 -32
- data/testing/cucumber/features/analysis/step_comparison.feature +25 -25
- data/testing/cucumber/features/analysis/test_comparison.feature +35 -35
- data/testing/cucumber/features/modeling/background_modeling.feature +105 -105
- data/testing/cucumber/features/modeling/background_output.feature +60 -60
- data/testing/cucumber/features/modeling/cell_modeling.feature +68 -68
- data/testing/cucumber/features/modeling/cell_output.feature +36 -36
- data/testing/cucumber/features/modeling/comment_modeling.feature +62 -62
- data/testing/cucumber/features/modeling/comment_output.feature +40 -40
- data/testing/cucumber/features/modeling/directory_modeling.feature +62 -62
- data/testing/cucumber/features/modeling/directory_output.feature +33 -33
- data/testing/cucumber/features/modeling/doc_string_modeling.feature +85 -85
- data/testing/cucumber/features/modeling/doc_string_output.feature +50 -50
- data/testing/cucumber/features/modeling/example_modeling.feature +155 -155
- data/testing/cucumber/features/modeling/example_output.feature +57 -57
- data/testing/cucumber/features/modeling/feature_file_modeling.feature +49 -49
- data/testing/cucumber/features/modeling/feature_file_output.feature +33 -33
- data/testing/cucumber/features/modeling/feature_modeling.feature +149 -149
- data/testing/cucumber/features/modeling/feature_output.feature +144 -144
- data/testing/cucumber/features/modeling/model_output.feature +61 -61
- data/testing/cucumber/features/modeling/model_structure.feature +42 -42
- data/testing/cucumber/features/modeling/outline_modeling.feature +175 -175
- data/testing/cucumber/features/modeling/outline_output.feature +87 -87
- data/testing/cucumber/features/modeling/row_modeling.feature +70 -70
- data/testing/cucumber/features/modeling/row_output.feature +40 -40
- data/testing/cucumber/features/modeling/rule_modeling.feature +171 -171
- data/testing/cucumber/features/modeling/rule_output.feature +136 -136
- data/testing/cucumber/features/modeling/scenario_modeling.feature +146 -146
- data/testing/cucumber/features/modeling/scenario_output.feature +63 -63
- data/testing/cucumber/features/modeling/step_modeling.feature +105 -105
- data/testing/cucumber/features/modeling/step_output.feature +47 -47
- data/testing/cucumber/features/modeling/table_modeling.feature +73 -73
- data/testing/cucumber/features/modeling/table_output.feature +42 -42
- data/testing/cucumber/features/modeling/tag_modeling.feature +62 -62
- data/testing/cucumber/features/modeling/tag_output.feature +40 -40
- metadata +6 -8
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
Feature: Cell output
|
|
2
|
-
|
|
3
|
-
A cell model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
-
inspection is the value of the cell that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the following gherkin:
|
|
9
|
-
"""
|
|
10
|
-
foo
|
|
11
|
-
"""
|
|
12
|
-
And a cell model based on that gherkin
|
|
13
|
-
"""
|
|
14
|
-
@model = CukeModeler::Cell.new(<source_text>)
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Scenario: Stringify a cell model
|
|
19
|
-
When the model is output as a string
|
|
20
|
-
"""
|
|
21
|
-
@model.to_s
|
|
22
|
-
"""
|
|
23
|
-
Then the following text is provided:
|
|
24
|
-
"""
|
|
25
|
-
foo
|
|
26
|
-
"""
|
|
27
|
-
|
|
28
|
-
Scenario: Inspect a cell model
|
|
29
|
-
When the model is inspected
|
|
30
|
-
"""
|
|
31
|
-
@model.inspect
|
|
32
|
-
"""
|
|
33
|
-
Then the following text is provided:
|
|
34
|
-
"""
|
|
35
|
-
#<CukeModeler::Cell:<object_id> @value: "foo">
|
|
36
|
-
"""
|
|
1
|
+
Feature: Cell output
|
|
2
|
+
|
|
3
|
+
A cell model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
+
inspection is the value of the cell that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given the following gherkin:
|
|
9
|
+
"""
|
|
10
|
+
foo
|
|
11
|
+
"""
|
|
12
|
+
And a cell model based on that gherkin
|
|
13
|
+
"""
|
|
14
|
+
@model = CukeModeler::Cell.new(<source_text>)
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Scenario: Stringify a cell model
|
|
19
|
+
When the model is output as a string
|
|
20
|
+
"""
|
|
21
|
+
@model.to_s
|
|
22
|
+
"""
|
|
23
|
+
Then the following text is provided:
|
|
24
|
+
"""
|
|
25
|
+
foo
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
Scenario: Inspect a cell model
|
|
29
|
+
When the model is inspected
|
|
30
|
+
"""
|
|
31
|
+
@model.inspect
|
|
32
|
+
"""
|
|
33
|
+
Then the following text is provided:
|
|
34
|
+
"""
|
|
35
|
+
#<CukeModeler::Cell:<object_id> @value: "foo">
|
|
36
|
+
"""
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
Feature: Comment modeling
|
|
2
|
-
|
|
3
|
-
Comment models represent a comment portion of a feature. They expose several attributes of the comment that they represent.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Background:
|
|
7
|
-
Given the following gherkin:
|
|
8
|
-
"""
|
|
9
|
-
# a comment
|
|
10
|
-
"""
|
|
11
|
-
And a comment model based on that gherkin
|
|
12
|
-
"""
|
|
13
|
-
@model = CukeModeler::Comment.new(<source_text>)
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Scenario: Modeling a comments text
|
|
18
|
-
When the comment's text is requested
|
|
19
|
-
"""
|
|
20
|
-
@model.text
|
|
21
|
-
"""
|
|
22
|
-
Then the model returns "# a comment"
|
|
23
|
-
|
|
24
|
-
Scenario: Modeling a comment's source line
|
|
25
|
-
Given a feature file with the following gherkin:
|
|
26
|
-
"""
|
|
27
|
-
# a comment
|
|
28
|
-
Feature:
|
|
29
|
-
"""
|
|
30
|
-
And a feature file model based on that file
|
|
31
|
-
"""
|
|
32
|
-
@model = CukeModeler::FeatureFile.new(<file_path>)
|
|
33
|
-
"""
|
|
34
|
-
And the comment model of that feature file model
|
|
35
|
-
"""
|
|
36
|
-
@model = @model.comments.first
|
|
37
|
-
"""
|
|
38
|
-
When the comment's source line is requested
|
|
39
|
-
"""
|
|
40
|
-
@model.source_line
|
|
41
|
-
"""
|
|
42
|
-
Then the model returns "1"
|
|
43
|
-
|
|
44
|
-
Scenario: Modeling a comment's source column
|
|
45
|
-
Given a feature file with the following gherkin:
|
|
46
|
-
"""
|
|
47
|
-
# a comment
|
|
48
|
-
Feature:
|
|
49
|
-
"""
|
|
50
|
-
And a feature file model based on that file
|
|
51
|
-
"""
|
|
52
|
-
@model = CukeModeler::FeatureFile.new(<file_path>)
|
|
53
|
-
"""
|
|
54
|
-
And the comment model of that feature file model
|
|
55
|
-
"""
|
|
56
|
-
@model = @model.comments.first
|
|
57
|
-
"""
|
|
58
|
-
When the comment's source column is requested
|
|
59
|
-
"""
|
|
60
|
-
@model.source_column
|
|
61
|
-
"""
|
|
62
|
-
Then the model returns "1"
|
|
1
|
+
Feature: Comment modeling
|
|
2
|
+
|
|
3
|
+
Comment models represent a comment portion of a feature. They expose several attributes of the comment that they represent.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given the following gherkin:
|
|
8
|
+
"""
|
|
9
|
+
# a comment
|
|
10
|
+
"""
|
|
11
|
+
And a comment model based on that gherkin
|
|
12
|
+
"""
|
|
13
|
+
@model = CukeModeler::Comment.new(<source_text>)
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Scenario: Modeling a comments text
|
|
18
|
+
When the comment's text is requested
|
|
19
|
+
"""
|
|
20
|
+
@model.text
|
|
21
|
+
"""
|
|
22
|
+
Then the model returns "# a comment"
|
|
23
|
+
|
|
24
|
+
Scenario: Modeling a comment's source line
|
|
25
|
+
Given a feature file with the following gherkin:
|
|
26
|
+
"""
|
|
27
|
+
# a comment
|
|
28
|
+
Feature:
|
|
29
|
+
"""
|
|
30
|
+
And a feature file model based on that file
|
|
31
|
+
"""
|
|
32
|
+
@model = CukeModeler::FeatureFile.new(<file_path>)
|
|
33
|
+
"""
|
|
34
|
+
And the comment model of that feature file model
|
|
35
|
+
"""
|
|
36
|
+
@model = @model.comments.first
|
|
37
|
+
"""
|
|
38
|
+
When the comment's source line is requested
|
|
39
|
+
"""
|
|
40
|
+
@model.source_line
|
|
41
|
+
"""
|
|
42
|
+
Then the model returns "1"
|
|
43
|
+
|
|
44
|
+
Scenario: Modeling a comment's source column
|
|
45
|
+
Given a feature file with the following gherkin:
|
|
46
|
+
"""
|
|
47
|
+
# a comment
|
|
48
|
+
Feature:
|
|
49
|
+
"""
|
|
50
|
+
And a feature file model based on that file
|
|
51
|
+
"""
|
|
52
|
+
@model = CukeModeler::FeatureFile.new(<file_path>)
|
|
53
|
+
"""
|
|
54
|
+
And the comment model of that feature file model
|
|
55
|
+
"""
|
|
56
|
+
@model = @model.comments.first
|
|
57
|
+
"""
|
|
58
|
+
When the comment's source column is requested
|
|
59
|
+
"""
|
|
60
|
+
@model.source_column
|
|
61
|
+
"""
|
|
62
|
+
Then the model returns "1"
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
Feature: Comment output
|
|
2
|
-
|
|
3
|
-
A comment model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
-
inspection is the text of the comment that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the following gherkin:
|
|
9
|
-
"""
|
|
10
|
-
# a comment
|
|
11
|
-
"""
|
|
12
|
-
And a comment model based on that gherkin
|
|
13
|
-
"""
|
|
14
|
-
@model = CukeModeler::Comment.new(<source_text>)
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Scenario: Stringify a comment model
|
|
19
|
-
When the model is output as a string
|
|
20
|
-
"""
|
|
21
|
-
@model.to_s
|
|
22
|
-
"""
|
|
23
|
-
Then the following text is provided:
|
|
24
|
-
"""
|
|
25
|
-
# a comment
|
|
26
|
-
"""
|
|
27
|
-
And the output can be used to make an equivalent model
|
|
28
|
-
"""
|
|
29
|
-
CukeModeler::Comment.new(@model.to_s)
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
Scenario: Inspect a comment model
|
|
33
|
-
When the model is inspected
|
|
34
|
-
"""
|
|
35
|
-
@model.inspect
|
|
36
|
-
"""
|
|
37
|
-
Then the following text is provided:
|
|
38
|
-
"""
|
|
39
|
-
#<CukeModeler::Comment:<object_id> @text: "# a comment">
|
|
40
|
-
"""
|
|
1
|
+
Feature: Comment output
|
|
2
|
+
|
|
3
|
+
A comment model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
+
inspection is the text of the comment that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given the following gherkin:
|
|
9
|
+
"""
|
|
10
|
+
# a comment
|
|
11
|
+
"""
|
|
12
|
+
And a comment model based on that gherkin
|
|
13
|
+
"""
|
|
14
|
+
@model = CukeModeler::Comment.new(<source_text>)
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Scenario: Stringify a comment model
|
|
19
|
+
When the model is output as a string
|
|
20
|
+
"""
|
|
21
|
+
@model.to_s
|
|
22
|
+
"""
|
|
23
|
+
Then the following text is provided:
|
|
24
|
+
"""
|
|
25
|
+
# a comment
|
|
26
|
+
"""
|
|
27
|
+
And the output can be used to make an equivalent model
|
|
28
|
+
"""
|
|
29
|
+
CukeModeler::Comment.new(@model.to_s)
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
Scenario: Inspect a comment model
|
|
33
|
+
When the model is inspected
|
|
34
|
+
"""
|
|
35
|
+
@model.inspect
|
|
36
|
+
"""
|
|
37
|
+
Then the following text is provided:
|
|
38
|
+
"""
|
|
39
|
+
#<CukeModeler::Comment:<object_id> @text: "# a comment">
|
|
40
|
+
"""
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
Feature: Directory modeling
|
|
2
|
-
|
|
3
|
-
Directory models are the top level element of a model tree. They expose several attributes of the directory that they represent, as well as containing models for any feature files or subdirectories that are present in the directory that they represent.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Background: An existing test suite
|
|
7
|
-
Given the directory "test_directory"
|
|
8
|
-
And the file "test_directory/test_file_1.feature"
|
|
9
|
-
And the file "test_directory/test_file_2.feature"
|
|
10
|
-
And the file "test_directory/random.file"
|
|
11
|
-
And the directory "test_directory/nested_directory"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Scenario: Modeling a directory's path
|
|
15
|
-
Given a directory is modeled
|
|
16
|
-
"""
|
|
17
|
-
@model = CukeModeler::Directory.new('<path_to>/test_directory')
|
|
18
|
-
"""
|
|
19
|
-
When the directory's path is requested
|
|
20
|
-
"""
|
|
21
|
-
@model.path
|
|
22
|
-
"""
|
|
23
|
-
Then the model returns "path_to/test_directory"
|
|
24
|
-
|
|
25
|
-
Scenario: Modeling a directory's name
|
|
26
|
-
Given a directory is modeled
|
|
27
|
-
"""
|
|
28
|
-
@model = CukeModeler::Directory.new('<path_to>/test_directory')
|
|
29
|
-
"""
|
|
30
|
-
When the directory's name is requested
|
|
31
|
-
"""
|
|
32
|
-
@model.name
|
|
33
|
-
"""
|
|
34
|
-
Then the model returns "test_directory"
|
|
35
|
-
|
|
36
|
-
Scenario: Modeling a directory's feature files
|
|
37
|
-
|
|
38
|
-
Note: Files that are not .feature files are not modeled
|
|
39
|
-
|
|
40
|
-
Given a directory is modeled
|
|
41
|
-
"""
|
|
42
|
-
@model = CukeModeler::Directory.new('<path_to>/test_directory')
|
|
43
|
-
"""
|
|
44
|
-
When the directory's feature files are requested
|
|
45
|
-
"""
|
|
46
|
-
@model.feature_files
|
|
47
|
-
"""
|
|
48
|
-
Then the model returns models for the following feature files:
|
|
49
|
-
| test_file_1.feature |
|
|
50
|
-
| test_file_2.feature |
|
|
51
|
-
|
|
52
|
-
Scenario: Modeling a directory's directories
|
|
53
|
-
Given a directory is modeled
|
|
54
|
-
"""
|
|
55
|
-
@model = CukeModeler::Directory.new('<path_to>/test_directory')
|
|
56
|
-
"""
|
|
57
|
-
When the directory's directories are requested
|
|
58
|
-
"""
|
|
59
|
-
@model.directories
|
|
60
|
-
"""
|
|
61
|
-
Then the model returns models for the following directories:
|
|
62
|
-
| nested_directory |
|
|
1
|
+
Feature: Directory modeling
|
|
2
|
+
|
|
3
|
+
Directory models are the top level element of a model tree. They expose several attributes of the directory that they represent, as well as containing models for any feature files or subdirectories that are present in the directory that they represent.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Background: An existing test suite
|
|
7
|
+
Given the directory "test_directory"
|
|
8
|
+
And the file "test_directory/test_file_1.feature"
|
|
9
|
+
And the file "test_directory/test_file_2.feature"
|
|
10
|
+
And the file "test_directory/random.file"
|
|
11
|
+
And the directory "test_directory/nested_directory"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Scenario: Modeling a directory's path
|
|
15
|
+
Given a directory is modeled
|
|
16
|
+
"""
|
|
17
|
+
@model = CukeModeler::Directory.new('<path_to>/test_directory')
|
|
18
|
+
"""
|
|
19
|
+
When the directory's path is requested
|
|
20
|
+
"""
|
|
21
|
+
@model.path
|
|
22
|
+
"""
|
|
23
|
+
Then the model returns "path_to/test_directory"
|
|
24
|
+
|
|
25
|
+
Scenario: Modeling a directory's name
|
|
26
|
+
Given a directory is modeled
|
|
27
|
+
"""
|
|
28
|
+
@model = CukeModeler::Directory.new('<path_to>/test_directory')
|
|
29
|
+
"""
|
|
30
|
+
When the directory's name is requested
|
|
31
|
+
"""
|
|
32
|
+
@model.name
|
|
33
|
+
"""
|
|
34
|
+
Then the model returns "test_directory"
|
|
35
|
+
|
|
36
|
+
Scenario: Modeling a directory's feature files
|
|
37
|
+
|
|
38
|
+
Note: Files that are not .feature files are not modeled
|
|
39
|
+
|
|
40
|
+
Given a directory is modeled
|
|
41
|
+
"""
|
|
42
|
+
@model = CukeModeler::Directory.new('<path_to>/test_directory')
|
|
43
|
+
"""
|
|
44
|
+
When the directory's feature files are requested
|
|
45
|
+
"""
|
|
46
|
+
@model.feature_files
|
|
47
|
+
"""
|
|
48
|
+
Then the model returns models for the following feature files:
|
|
49
|
+
| test_file_1.feature |
|
|
50
|
+
| test_file_2.feature |
|
|
51
|
+
|
|
52
|
+
Scenario: Modeling a directory's directories
|
|
53
|
+
Given a directory is modeled
|
|
54
|
+
"""
|
|
55
|
+
@model = CukeModeler::Directory.new('<path_to>/test_directory')
|
|
56
|
+
"""
|
|
57
|
+
When the directory's directories are requested
|
|
58
|
+
"""
|
|
59
|
+
@model.directories
|
|
60
|
+
"""
|
|
61
|
+
Then the model returns models for the following directories:
|
|
62
|
+
| nested_directory |
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
Feature: Directory output
|
|
2
|
-
|
|
3
|
-
A directory model's string output is simply the file path of the directory that it models and its
|
|
4
|
-
most relevant attribute for inspection is the path of the directory that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given a directory model based on "some_directory"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Scenario: Stringify a directory model
|
|
12
|
-
When the model is output as a string
|
|
13
|
-
"""
|
|
14
|
-
@model.to_s
|
|
15
|
-
"""
|
|
16
|
-
Then the following text is provided:
|
|
17
|
-
"""
|
|
18
|
-
<path_to>/some_directory
|
|
19
|
-
"""
|
|
20
|
-
And the output can be used to make an equivalent model
|
|
21
|
-
"""
|
|
22
|
-
CukeModeler::Directory.new(@model.to_s)
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
Scenario: Inspect a directory model
|
|
26
|
-
When the model is inspected
|
|
27
|
-
"""
|
|
28
|
-
@model.inspect
|
|
29
|
-
"""
|
|
30
|
-
Then the following text is provided:
|
|
31
|
-
"""
|
|
32
|
-
#<CukeModeler::Directory:<object_id> @path: "<path_to>/some_directory">
|
|
33
|
-
"""
|
|
1
|
+
Feature: Directory output
|
|
2
|
+
|
|
3
|
+
A directory model's string output is simply the file path of the directory that it models and its
|
|
4
|
+
most relevant attribute for inspection is the path of the directory that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given a directory model based on "some_directory"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Scenario: Stringify a directory model
|
|
12
|
+
When the model is output as a string
|
|
13
|
+
"""
|
|
14
|
+
@model.to_s
|
|
15
|
+
"""
|
|
16
|
+
Then the following text is provided:
|
|
17
|
+
"""
|
|
18
|
+
<path_to>/some_directory
|
|
19
|
+
"""
|
|
20
|
+
And the output can be used to make an equivalent model
|
|
21
|
+
"""
|
|
22
|
+
CukeModeler::Directory.new(@model.to_s)
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
Scenario: Inspect a directory model
|
|
26
|
+
When the model is inspected
|
|
27
|
+
"""
|
|
28
|
+
@model.inspect
|
|
29
|
+
"""
|
|
30
|
+
Then the following text is provided:
|
|
31
|
+
"""
|
|
32
|
+
#<CukeModeler::Directory:<object_id> @path: "<path_to>/some_directory">
|
|
33
|
+
"""
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
Feature: Doc string modeling
|
|
2
|
-
|
|
3
|
-
Doc string models represent the doc string argument to a step. They expose several attributes of the doc string that they represent.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Background:
|
|
7
|
-
Given the following gherkin:
|
|
8
|
-
"""
|
|
9
|
-
\"\"\" type foo
|
|
10
|
-
content bar
|
|
11
|
-
\"\"\"
|
|
12
|
-
"""
|
|
13
|
-
And a doc string model based on that gherkin
|
|
14
|
-
"""
|
|
15
|
-
@model = CukeModeler::DocString.new(<source_text>)
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Scenario: Modeling a doc string's content type
|
|
20
|
-
When the doc string's name is requested
|
|
21
|
-
"""
|
|
22
|
-
@model.content_type
|
|
23
|
-
"""
|
|
24
|
-
Then the model returns "type foo"
|
|
25
|
-
|
|
26
|
-
Scenario: Modeling a doc string's content
|
|
27
|
-
When the doc string's content is requested
|
|
28
|
-
"""
|
|
29
|
-
@model.content
|
|
30
|
-
"""
|
|
31
|
-
Then the model returns
|
|
32
|
-
"""
|
|
33
|
-
content bar
|
|
34
|
-
"""
|
|
35
|
-
|
|
36
|
-
Scenario: Modeling a doc string's source line
|
|
37
|
-
Given the following gherkin:
|
|
38
|
-
"""
|
|
39
|
-
Feature:
|
|
40
|
-
|
|
41
|
-
Scenario:
|
|
42
|
-
* a step
|
|
43
|
-
\"\"\"
|
|
44
|
-
foo
|
|
45
|
-
\"\"\"
|
|
46
|
-
"""
|
|
47
|
-
And a feature model based on that gherkin
|
|
48
|
-
"""
|
|
49
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
50
|
-
"""
|
|
51
|
-
And the doc string model inside of that feature model
|
|
52
|
-
"""
|
|
53
|
-
@model = @model.tests.first.steps.first.block
|
|
54
|
-
"""
|
|
55
|
-
When the doc string's source line is requested
|
|
56
|
-
"""
|
|
57
|
-
@model.source_line
|
|
58
|
-
"""
|
|
59
|
-
Then the model returns "5"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Scenario: Modeling a doc string's source column
|
|
63
|
-
Given the following gherkin:
|
|
64
|
-
"""
|
|
65
|
-
Feature:
|
|
66
|
-
|
|
67
|
-
Scenario:
|
|
68
|
-
* a step
|
|
69
|
-
\"\"\"
|
|
70
|
-
foo
|
|
71
|
-
\"\"\"
|
|
72
|
-
"""
|
|
73
|
-
And a feature model based on that gherkin
|
|
74
|
-
"""
|
|
75
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
76
|
-
"""
|
|
77
|
-
And the doc string model inside of that feature model
|
|
78
|
-
"""
|
|
79
|
-
@model = @model.tests.first.steps.first.block
|
|
80
|
-
"""
|
|
81
|
-
When the doc string's source column is requested
|
|
82
|
-
"""
|
|
83
|
-
@model.source_column
|
|
84
|
-
"""
|
|
85
|
-
Then the model returns "7"
|
|
1
|
+
Feature: Doc string modeling
|
|
2
|
+
|
|
3
|
+
Doc string models represent the doc string argument to a step. They expose several attributes of the doc string that they represent.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given the following gherkin:
|
|
8
|
+
"""
|
|
9
|
+
\"\"\" type foo
|
|
10
|
+
content bar
|
|
11
|
+
\"\"\"
|
|
12
|
+
"""
|
|
13
|
+
And a doc string model based on that gherkin
|
|
14
|
+
"""
|
|
15
|
+
@model = CukeModeler::DocString.new(<source_text>)
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Scenario: Modeling a doc string's content type
|
|
20
|
+
When the doc string's name is requested
|
|
21
|
+
"""
|
|
22
|
+
@model.content_type
|
|
23
|
+
"""
|
|
24
|
+
Then the model returns "type foo"
|
|
25
|
+
|
|
26
|
+
Scenario: Modeling a doc string's content
|
|
27
|
+
When the doc string's content is requested
|
|
28
|
+
"""
|
|
29
|
+
@model.content
|
|
30
|
+
"""
|
|
31
|
+
Then the model returns
|
|
32
|
+
"""
|
|
33
|
+
content bar
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
Scenario: Modeling a doc string's source line
|
|
37
|
+
Given the following gherkin:
|
|
38
|
+
"""
|
|
39
|
+
Feature:
|
|
40
|
+
|
|
41
|
+
Scenario:
|
|
42
|
+
* a step
|
|
43
|
+
\"\"\"
|
|
44
|
+
foo
|
|
45
|
+
\"\"\"
|
|
46
|
+
"""
|
|
47
|
+
And a feature model based on that gherkin
|
|
48
|
+
"""
|
|
49
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
50
|
+
"""
|
|
51
|
+
And the doc string model inside of that feature model
|
|
52
|
+
"""
|
|
53
|
+
@model = @model.tests.first.steps.first.block
|
|
54
|
+
"""
|
|
55
|
+
When the doc string's source line is requested
|
|
56
|
+
"""
|
|
57
|
+
@model.source_line
|
|
58
|
+
"""
|
|
59
|
+
Then the model returns "5"
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
Scenario: Modeling a doc string's source column
|
|
63
|
+
Given the following gherkin:
|
|
64
|
+
"""
|
|
65
|
+
Feature:
|
|
66
|
+
|
|
67
|
+
Scenario:
|
|
68
|
+
* a step
|
|
69
|
+
\"\"\"
|
|
70
|
+
foo
|
|
71
|
+
\"\"\"
|
|
72
|
+
"""
|
|
73
|
+
And a feature model based on that gherkin
|
|
74
|
+
"""
|
|
75
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
76
|
+
"""
|
|
77
|
+
And the doc string model inside of that feature model
|
|
78
|
+
"""
|
|
79
|
+
@model = @model.tests.first.steps.first.block
|
|
80
|
+
"""
|
|
81
|
+
When the doc string's source column is requested
|
|
82
|
+
"""
|
|
83
|
+
@model.source_column
|
|
84
|
+
"""
|
|
85
|
+
Then the model returns "7"
|