macros4cuke 0.4.01 → 0.4.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.
- checksums.yaml +8 -8
- data/CHANGELOG.md +4 -0
- data/README.md +18 -0
- data/features/support/env.rb +3 -3
- data/lib/macro_steps.rb +3 -0
- data/lib/macros4cuke/constants.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmI3NDI4NzIzZjFiYjEwNjAyNjZhZTdlMTc0MzcwY2EyMWJlNzQyOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDU1NzNjYjk0MjFkYjFmYzE0NTAyZTM5NTk4MmY0MDc1NjUyN2FiZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjZjMWViYzg0NjdhNDA5YTlhMzU0YWQ1M2FiOTk1ZjJmZmU4YWVlMWEzOWU2
|
10
|
+
OTRkZTlmYzU0M2I4YzFmZWU1NGEyNmQ5MjgwYTIzYzU4MjI0YmZhOGNkODAz
|
11
|
+
N2Y1ZmI5NTcxMzI3MTljODJiZGQ5YTJhYWJhYmZkZjU5ODdkMDc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWI0YTkzZWMzMGQ0YjliNWJiMmEyNzYzYjY2YThmNjZkNDM1MTJmMTljMGMx
|
14
|
+
N2Y4YmVkYjJlM2Y2YzAyM2U3Y2M3ZmE5NWE4MTI1YmEyMWNkMmNhZGI2NjA5
|
15
|
+
OGIwY2JmMDAzY2U2MjNkOGI4N2I4MTlkMjQwNjU4OTc4Y2ZmNDI=
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
### 0.4.02 / 2013-11_17
|
2
|
+
* [CHANGE] File `README.md`: Added section on new feature: capability to list all macros.
|
3
|
+
* [CHANGE] Files from `macro_steps.rb`: Added the `require` to enable the new step.
|
4
|
+
|
1
5
|
### 0.4.01 / 2013-11_17
|
2
6
|
* [CHANGE] File `.rubocop.yml`: Disabled a few new 0.15.0 cops
|
3
7
|
* [CHANGE] Files from `lib` and `spec` dirs updated for Rubocop 0.15.0
|
data/README.md
CHANGED
@@ -22,6 +22,8 @@ __Macros4Cuke__ is a lightweight library that adds a macro facility your Cucumbe
|
|
22
22
|
* Domain neutral: applicable to any kind of application that can be driven with Cucumber,
|
23
23
|
* A group of sub-steps can be made conditional.
|
24
24
|
|
25
|
+
Since version 0.4.00, it is also possible to [list all the encountered macro definitions](#listing-all-the-macro-definitions).
|
26
|
+
|
25
27
|
## A quick example ##
|
26
28
|
Here is a macro-step example taken from our demo files:
|
27
29
|
|
@@ -435,6 +437,22 @@ text in an entry field may be noticeably different than skipping that same entry
|
|
435
437
|
Think of specific UI-events that can trigger some special system response.
|
436
438
|
|
437
439
|
|
440
|
+
## Listing all the macro definitions ##
|
441
|
+
When one begins to write macros spread over a large collection of feature files
|
442
|
+
it becomes interesting to have an overview, a list of all macro ever defined.
|
443
|
+
Therefore _Macros4Cuke_ comes with a pre-defined step that generates such a list of macro definitions.
|
444
|
+
This specialized step has the following syntax:
|
445
|
+
|
446
|
+
```cucumber
|
447
|
+
When I want to list all the macros in the file "all_macros.feature"
|
448
|
+
```
|
449
|
+
|
450
|
+
Where `all_macros.feature` is a feature file that will be generated when Cucumber
|
451
|
+
terminates. The resulting feature file lists all the macros (one per scenario) in
|
452
|
+
the familiar Gherkin syntax.
|
453
|
+
|
454
|
+
|
455
|
+
|
438
456
|
## A word on Step Argument Transforms##
|
439
457
|
Cucumber provides a handy facility that helps to convert implicitly the values of step arguments.
|
440
458
|
A first description of this lesser-known functionality is available at
|
data/features/support/env.rb
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
# to use the Macros4Cuke gem.
|
6
6
|
|
7
7
|
require 'pp'
|
8
|
-
require_relative '../../lib/macros4cuke/macro-collection'
|
9
|
-
require_relative '../../lib/macros4cuke/formatting-service'
|
10
|
-
require_relative '../../lib/macros4cuke/formatter/to-gherkin'
|
8
|
+
#require_relative '../../lib/macros4cuke/macro-collection'
|
9
|
+
#require_relative '../../lib/macros4cuke/formatting-service'
|
10
|
+
#require_relative '../../lib/macros4cuke/formatter/to-gherkin'
|
11
11
|
|
12
12
|
begin
|
13
13
|
require 'simplecov' # Development dependency only...
|
data/lib/macro_steps.rb
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
# Purpose: step definitions that help to build macro-steps
|
3
3
|
# (i.e. a Cucumber step that is equivalent to a sequence of sub-steps)
|
4
4
|
|
5
|
+
require_relative './macros4cuke/macro-collection'
|
6
|
+
require_relative './macros4cuke/formatting-service'
|
7
|
+
require_relative './macros4cuke/formatter/to-gherkin'
|
5
8
|
|
6
9
|
|
7
10
|
# This step is used to define a macro-step
|