macros4cuke 0.2.01 → 0.2.02
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.
- data/HISTORY.md +20 -1
- data/README.md +10 -3
- data/lib/macros4cuke/constants.rb +1 -1
- data/spec/macros4cuke/macro-step_spec.rb +10 -0
- metadata +1 -1
data/HISTORY.md
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
## [0.2.
|
1
|
+
## [0.2.02]
|
2
|
+
### Changes:
|
3
|
+
* Added an example in template-engine_spec.rb file.
|
4
|
+
|
5
|
+
|
6
|
+
### Documentation:
|
7
|
+
* Expanded the README.md file.
|
8
|
+
|
9
|
+
## [0.2.01]
|
2
10
|
### Changes:
|
3
11
|
* Regexp in the step definitions are more robust: they accept escape character sequence.
|
4
12
|
|
@@ -10,6 +18,17 @@
|
|
10
18
|
* Expanded the README.md file.
|
11
19
|
|
12
20
|
|
21
|
+
## [0.2.00] Version number was bumped
|
22
|
+
### Changes:
|
23
|
+
* Replaced the Mustache template engine by own lightweight TemplateEngine
|
24
|
+
* Macro-step arguments have a syntax that is closer to Gherkin's scenario outlines.
|
25
|
+
* Upgraded TemplateEngine class to become a simple templating system.
|
26
|
+
* Remove dependency to mustache gem.
|
27
|
+
|
28
|
+
### Documentation:
|
29
|
+
* All demos updated to new syntax.
|
30
|
+
* Updated the examples in README.md
|
31
|
+
|
13
32
|
|
14
33
|
## [0.1.07]
|
15
34
|
### Changes:
|
data/README.md
CHANGED
@@ -109,8 +109,16 @@ Let's begin with a simple example:
|
|
109
109
|
|
110
110
|
The first line in the snippet is a step that helps to define macro-step.
|
111
111
|
It is a perfectly valid step once your Cucumber project was configured to use __Macros4Cuke__
|
112
|
-
as explained in the Setup section above.
|
113
|
-
|
112
|
+
as explained in the Setup section above. The syntax of the new step being created is specified by
|
113
|
+
the text between quotes.
|
114
|
+
Here, for instance, the new step will have for syntax:
|
115
|
+
```cucumber
|
116
|
+
When I [enter my credentials]
|
117
|
+
```
|
118
|
+
It is important to realize that the structure of the sentence outside the quotes ```Given I define the step "..." to mean:```
|
119
|
+
is the syntax of the _defining_ step not of your macro-step.
|
120
|
+
|
121
|
+
A key ingredient of the syntax of a macro-step sentence is its __phrase__, that is, the text on the first line that appears
|
114
122
|
between square brackets [...].
|
115
123
|
In the example at hand, the _phrase_ is the text:
|
116
124
|
```cucumber
|
@@ -156,7 +164,6 @@ enumerates the sub-steps associated with the macro-step. A pleasing aspect is th
|
|
156
164
|
And I click "Sign in"
|
157
165
|
"""
|
158
166
|
```
|
159
|
-
|
160
167
|
|
161
168
|
---
|
162
169
|
|
@@ -49,6 +49,16 @@ end
|
|
49
49
|
|
50
50
|
context "Provided services" do
|
51
51
|
it "should render the substeps" do
|
52
|
+
text = subject.expand({'userid' => 'nobody', 'password' => 'no-secret'})
|
53
|
+
expectation = <<-SNIPPET
|
54
|
+
Given I landed in the homepage
|
55
|
+
When I click "Sign in"
|
56
|
+
And I fill in "Username" with "nobody"
|
57
|
+
And I fill in "Password" with "no-secret"
|
58
|
+
And I click "Submit"
|
59
|
+
SNIPPET
|
60
|
+
|
61
|
+
text.should == expectation
|
52
62
|
end
|
53
63
|
end # context
|
54
64
|
|