macros4cuke 0.2.01 → 0.2.02

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.md CHANGED
@@ -1,4 +1,12 @@
1
- ## [0.2.00] Version number was bumped
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
- The syntax of a macro-step sentence is defined by its __phrase__, that is, the text on the first line that appears
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
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Macros4Cuke # Module used as a namespace
5
5
  # This constant keeps the current version of the gem.
6
- Version = '0.2.01'
6
+ Version = '0.2.02'
7
7
 
8
8
  Description = "Macros for Cucumber"
9
9
 
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macros4cuke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.01
4
+ version: 0.2.02
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: