cukedep 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzA2NDcyMDk3YzZkNmY0ZTkxYWM4MjViODhkNmRiNDYyMTM0NjE4Yw==
4
+ NTFmZmYzYjM3ODEyODM5Yjg4OWIxYTU2Njk2MDcyMzhiOGIwYjA2Nw==
5
5
  data.tar.gz: !binary |-
6
- M2Q5NmI0NzgzMTVhMWFkNmNkN2MwOTM5NDNhZTczMTdlYTFiMTBlMQ==
6
+ ZGUyMmMxMjJhYmVmMmU1YTNmOGU3YWNjODBkMDA1OWQxOTg1MDlhMw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ODM5NjBjZjdkYjE5ZjQ4ZmE0OTQ2ODJlNjMzNWQ1OTU4MTAyOGJjYmI3MmVi
10
- MzUzZTUwOTY3YjgzNTRlODZmZTMxMTI5NDg2MjE0NWY2YjM2MWFhZWI2MGJj
11
- YWRhOGVkMWMyMGNhMzFhMTcwNTY2ZTcyN2Y2ZGRhMTVmZjgxY2M=
9
+ ZDQyNDUzMzdkYzIyZTMwMGEyNDE0ZjRjMGJiYmViODBmY2U4OWNlNDQ2NzBl
10
+ ZmE3YmJhMjk1ODNkZDQ0NGRmODQ1NTZhNzU0MDUyOGZlODViMmQ1M2I4MWQ2
11
+ Y2JkOGU5NjJmZWUzZDcxNmRlMzEzYWI0NzVjY2E1NjM2MzU5NDI=
12
12
  data.tar.gz: !binary |-
13
- MzM3NmFiNTY1MjNjM2U5MDk0ZmVlM2EyMWNlZTc3MTExNWNmYzJiZDgzZDY0
14
- MjlhYzdmNTk2NzE2YWVhZWFiNmQwZTQ2YWVmMjRhMTRjYmY1MWQ0ZGIzNTA5
15
- M2QzYjMzYTY5OTIwYjJmMGExMDg1M2RhOTRkYzk3NTAzYzgwMzU=
13
+ MDkxMWFiZmYzM2Q1ZTNmMWExZjcxOTA0MGRkOGRhZTljNjMzMzQ4N2U3ZDM2
14
+ MWZjOTU5N2FjYmIyY2RhMDUwNmFiNjI3YTE0N2UwOTMyNjU5ZDdhYWJhMjRh
15
+ YTQyNTUwMjZmOGY4NTI4YTg5ZGIyMTZjMGNlMzA5NWU0YjRlZGU=
@@ -1,3 +1,6 @@
1
+ ### 0.0.6 / 2013-10-25
2
+ * [CHANGE] Files `README.md` Added rationale text and recap paragraph.
3
+
1
4
  ### 0.0.5 / 2013-10-24
2
5
  * [CHANGE] Files `README.md` Added section on how to specify dependencies.
3
6
 
data/README.md CHANGED
@@ -3,20 +3,47 @@ Cukedep
3
3
  [![Build Status](https://travis-ci.org/famished-tiger/cukedep.png?branch=master)](https://travis-ci.org/famished-tiger/cukedep)
4
4
  [![Gem Version](https://badge.fury.io/rb/cukedep.png)](http://badge.fury.io/rb/cukedep)
5
5
 
6
- _Handle dependencies between feature file._
6
+ _Handle dependencies between feature files._
7
7
  [Homepage](https://github.com/famished-tiger/cukedep)
8
8
 
9
- __Cukedep__ is a command-line utility that helps to run a set feature files in the proper sequence.
9
+ ### What is Cukedep? ###
10
+ __Cukedep__ is a command-line utility that helps to execute Cucumber feature files
11
+ in a sequence that meets their dependencies.
12
+ With __Cukedep__ you can:
13
+ * Specify that a given feature file has one or other feature files as its pre-requisite.
14
+ * Manage the dependencies, thanks to dependency reports and diagram.
15
+ * Overcome Cucumber's constraint: file name sort order == execution order
16
+
17
+ ### Should dependencies between feature files not be banned? ###
18
+ The short answer is a "Yes but..."
19
+
20
+ In an ideal world, tests and feature files could be run one independently of each other.
21
+ However, when the feature file set grows in size and complexity it becomes more and more
22
+ difficult to guarantee watertight isolation between feature files. For instance, steps in a feature file may have side effects
23
+ that influence the results of scenarios from another feature.
24
+ While side effects are often undesirable, that does not means that they should ALWAYS be
25
+ avoided:
26
+ * Because the removal/reversal of a side effect can be too complicated or tedious,
27
+ * Because the results of a feature can be re-used with profit in another feature.
28
+
29
+ To illustrate the second point consider the following case:
30
+ * You want to test the calculation of invoices but the business of your company
31
+ involves many kinds of billable transactions with their own complicated lifecycle
32
+ (e.g. a purchase order). It might be more expedient to test the invoicing by
33
+ re-using paying transactions generated by other -specialized- features. As a consequence,
34
+ most invoice-related features should run after the execution of the paying transaction.
35
+ Feature file isolation has been traded off for efficiency.
36
+
10
37
 
11
38
  ### Highlights ###
12
- * Simple syntax to specify dependencies
39
+ * Simple syntax to specify dependencies in your feature files
13
40
  * Generates dependency reports (in CSV format)
14
- * Generates dependency diagram (in DOT format),
41
+ * Generates dependency diagram (in GraphViz's DOT format),
15
42
  * Generates a Rake file.
16
43
 
17
44
 
18
45
  ### Installation ###
19
- The installation of the cukedep gem is fairly standard:
46
+ The installation of the __cukedep__ gem is fairly standard:
20
47
  ```bash
21
48
  $[sudo] gem install cukedep
22
49
  ```
@@ -27,7 +54,7 @@ and type the command-line:
27
54
  cukedep --version
28
55
  ```
29
56
 
30
- You should see the version of cukedep gem.
57
+ You should see the version of __cukedep__ gem.
31
58
 
32
59
 
33
60
  ### Synopsis ###
@@ -40,17 +67,17 @@ rake
40
67
 
41
68
  You will see tests running and Cucumber executing a number of feature files.
42
69
 
43
- To learn more what's happening, go to the ```rspec/sample_features``` dir
44
- You will notice a number of feature files for a sample application.
45
- Stay in that folder and type the following command-line:
70
+ To learn more what's happening, go to the ```rspec/sample_features``` dir.
71
+ You will notice a number of feature files for a sample application.
72
+ Stay in that folder and type the following command-line:
46
73
  ```bash
47
74
  cukedep --project ../../../sample --dry-run
48
75
  ```
49
76
 
50
- You told cukedep to do the following:
51
- * Read (parse) all the feature files in the current dir.
52
- * Resolve the dependencies between the feature files (based on Gherkin @tags with a special format).
53
- * Generate a number of dependency reports and drawing.
77
+ You told cukedep to do the following:
78
+ * Read (parse) all the feature files in the current dir.
79
+ * Resolve the dependencies between the feature files (based on Gherkin @tags with a special format).
80
+ * Generate a number of dependency reports and drawing.
54
81
  * Generate a rake file that will execute the feature files in the proper sequence for
55
82
  the project located at the relative path ```../../../sample```
56
83
 
@@ -63,8 +90,8 @@ cukedep --project ../../../sample
63
90
  Now you see cukedep redoing the same actions as previously but in addition
64
91
  it:
65
92
  * Copies a feature file from the current directive to the Cucumber-based project
66
- * Let Cucumber execute the feature file
67
- * Repeat the two above steps in a sequence that meet the dependencies specified in the feature files.
93
+ * Lets Cucumber execute the feature file
94
+ * Repeats the two above steps in a sequence that meet the dependencies specified in the feature files.
68
95
 
69
96
 
70
97
  ### How can I define dependencies? ###
@@ -72,27 +99,31 @@ To define dependencies between feature files, use Gherkin specific tags.
72
99
  Suppose that feature `foo` depends on feature `bar`.
73
100
  Then the feature file `foo` may begin as follows:
74
101
 
75
- ```cucumber
76
- # The next line names this feature 'foo' and make dependent on 'bar'
77
- @feature:foo @depends_on:bar
78
- Feature: Check-in
79
- As a video rental employee
80
- I want to register return of rented videos
81
- So that other members can them too
102
+ ```cucumber
103
+ # The next line names this feature 'foo' and make dependent on 'bar'
104
+ @feature:foo @depends_on:bar
105
+ Feature: Check-in
106
+ As a video rental employee
107
+ I want to register return of rented videos
108
+ So that other members can them too
82
109
  ```
83
110
 
84
111
  While feature `bar` may start like this:
85
- ```cucumber
86
- # The next line names this feature 'bar'
87
- @feature:bar
88
- Feature: Renting videos
89
- As a video rental employee
90
- I want to register rentals made by a member
91
- So I can run my business
112
+ ```cucumber
113
+ # The next line names this feature 'bar'
114
+ @feature:bar
115
+ Feature: Renting videos
116
+ As a video rental employee
117
+ I want to register rentals made by a member
118
+ So I can run my business
92
119
  ```
93
120
 
121
+ #### Recap: ####
122
+ - To identify/name a feature use a tag of the form: `@feature:foo`
123
+ - To express a dependency on a feature with identifier `foo`, use the tag syntax: `@depends_on:foo`
94
124
 
95
125
 
96
126
  Copyright
97
127
  ---------
98
- Copyright (c) 2013, Dimitri Geshef. Cukedep is released under the MIT License see [LICENSE.txt](https://github.com/famished-tiger/Cukedep/blob/master/LICENSE.txt) for details.
128
+ Copyright (c) 2013, Dimitri Geshef.
129
+ __Cukedep__ is released under the MIT License see [LICENSE.txt](https://github.com/famished-tiger/Cukedep/blob/master/LICENSE.txt) for details.
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Cukedep # Module used as a namespace
5
5
  # The version number of the gem.
6
- Version = '0.0.5'
6
+ Version = '0.0.6'
7
7
 
8
8
  # Brief description of the gem.
9
9
  Description = 'Manage dependencies between Cucumber feature files'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cukedep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitri Geshef
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-24 00:00:00.000000000 Z
11
+ date: 2013-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber