cellophane 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.cellophane.yaml ADDED
@@ -0,0 +1 @@
1
+ cucumber: --format progress --no-profile
@@ -0,0 +1,7 @@
1
+ cucumber: --format progress --no-profile
2
+ feature_path: cuke/features
3
+ step_path: cuke/steps
4
+ # step_path:
5
+ # nested_in: step_definitions
6
+ requires:
7
+ - cuke/support
data/.document ADDED
@@ -0,0 +1,4 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ LICENSE.txt
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Phillip Koebbe
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.textile ADDED
@@ -0,0 +1,269 @@
1
+ h1. Cellophane
2
+
3
+ Cellophane is a thin wrapper around "Cucumber":http://github.com/aslakhellesoy/cucumber that is intended to make it easier to structure projects in ways that make sense to the people working on them. It has been tested with Cucumber 0.10.0 on Ruby 1.8.7-p302 and Ruby 1.9.2-p0.
4
+
5
+ h3. Installation
6
+
7
+ @gem install cellophane@
8
+
9
+ h3. History
10
+
11
+ By default, Cucumber expects features to live in @features@ and step definitions to live in @features/step_definitions@. When running a feature, all step definitions are loaded unless you explicitly require just the ones you want. If you structure your project differently, you have to require files explicitly, which gets old real fast.
12
+
13
+ After some experimenting with different directory structures, I settled on the following for my own projects:
14
+
15
+ <pre>
16
+ my_project
17
+ - app
18
+ - config
19
+ - cuke
20
+ - features
21
+ - steps
22
+ - support
23
+ - db
24
+ - lib
25
+ - etc, etc
26
+ </pre>
27
+
28
+ It's based on the structure of the @spec@ directory and I find that it fits my brain pretty well. There are three organizational strategies that I found myself following:
29
+
30
+ # separation of features in subdirectories
31
+ # keeping feature specific steps in files that are named according to the feature
32
+ # keeping all shared steps in files that are named in a more generalized fashion
33
+
34
+ For example, a project my look like this:
35
+
36
+ <pre>
37
+ my_project
38
+ - app
39
+ - config
40
+ - cuke
41
+ - features
42
+ - admin
43
+ - reports
44
+ - user_maintenance
45
+ - user
46
+ - communication
47
+ - profile
48
+ - steps
49
+ - admin
50
+ - reports
51
+ - user_maintenance
52
+ - user
53
+ - communication
54
+ - profile
55
+ - support
56
+ - db
57
+ - lib
58
+ - etc, etc
59
+ </pre>
60
+
61
+ If the features in @cuke/features/admin/reports@ had any steps that were specific to them, they would live @cuke/steps/admin/reports@. Any steps that are shared between two or more features would go in files in @cuke/support@.
62
+
63
+ To use this structure in Cucumber requires explicitly requiring the files/directories with every run. To run all of the features in @cuke/features/admin/reports@, I would enter the command
64
+
65
+ <pre>
66
+ cucumber -r cuke/support -r cuke/steps/admin/reports cuke/features/admin/reports
67
+ </pre>
68
+
69
+ I got weary of doing that all the time, so I experimented with aliases and profiles, neither of which really met my needs. So I created Cellophane. With it, the same features could be as easy as:
70
+
71
+ <pre>
72
+ cellophane admin/*
73
+ </pre>
74
+
75
+ As time went on, more patterns began to emerge from my workflow, and with them, Cellophane gained abilities.
76
+
77
+ h3. Configuration
78
+
79
+ Cellophane is configured by a @.cellophane.yaml@ file that lives in the root of your project. In it, you can define where your features are located, where your steps are located, any other files/directories that should be required by Cucumber, and any default options you want to pass to Cucumber. It looks like
80
+
81
+ <pre>
82
+ cucumber: --format progress --no-profile
83
+ feature_path: cuke/features
84
+ step_path: cuke/steps
85
+ requires: [cuke/support, cuke/steps/shared]
86
+ </pre>
87
+
88
+ This is the configuration used to support the project structure described above.
89
+
90
+ @step_path@ can be one of two values
91
+
92
+ # a directory relative to the project root
93
+ # a hash that indicates steps are nested under the feature directories
94
+
95
+ For the first,
96
+
97
+ <pre>
98
+ feature_path: features
99
+ step_path: features/step_definitions
100
+ </pre>
101
+
102
+ would be used for a Cucumber default directory structure:
103
+
104
+ <pre>
105
+ my_project
106
+ - app
107
+ - config
108
+ - features
109
+ - step_definitions
110
+ - support
111
+ - db
112
+ - lib
113
+ - etc, etc
114
+ </pre>
115
+
116
+ This is the default in Cellophane. If your cukes are structured like this, you need not do anything else and it should work.
117
+
118
+ For the second style,
119
+
120
+ <pre>
121
+ feature_path: features
122
+ step_path:
123
+ nested_in: step_definitions
124
+ </pre>
125
+
126
+ would be used if you nest your step definitions under each feature subdirectory, such as:
127
+
128
+ <pre>
129
+ my_project
130
+ - app
131
+ - config
132
+ - features
133
+ - admin
134
+ - step_definitions
135
+ - user
136
+ - step_definitions
137
+ - visitor
138
+ - step_definitions
139
+ - support
140
+ - db
141
+ - lib
142
+ - etc, etc
143
+ </pre>
144
+
145
+ @requires@ is an array of files/directories that Cucumber should require. If this is defined:
146
+
147
+ <pre>
148
+ requires: [cuke/support, /Users/me/shared/cool_library]
149
+ </pre>
150
+
151
+ @-r cuke/support -r /Users/me/shared/cool_library@ will be passed to Cucumber.
152
+
153
+ h3. Operation
154
+
155
+ Cellophane has the following command line options:
156
+
157
+ <pre>
158
+ Usage: cellophane [options] PATTERN
159
+ -r, --regexp PATTERN is a regular expression. Default is false.
160
+ -t, --tags TAGS Tags to include/exclude.
161
+ -c, --cucumber OPTIONS Options to pass to cucumber.
162
+ -p, --print Echo the command instead of calling cucumber.
163
+ -d, --debug Require ruby-debug.
164
+ -h, --help Display this screen.
165
+ </pre>
166
+
167
+ PATTERN is the pattern of feature files that you are interested in. By default PATTERN is a glob, but by using the @-r/--regexp@ switch, you can pass a Ruby regular expression instead (no slashes necessary). When using a glob, you can specify that files matching the pattern are to be excluded by preceeding the pattern with a tilde (~). You can also combine include and exclude patterns in the same call. See below for examples.
168
+
169
+ If you need to pass something through to Cucumber, such as a formatter, use the @-c/--cucumber@ switch. Depending on what it is you are passing through, you might need to enclose it in quotes. Do keep in mind that @-c/--cucumber@ on the command line overrides that defined in the YAML file.
170
+
171
+ @-d/--debug@ is only useful for Cellophane development and will have no effect on Cucumber.
172
+
173
+ h3. Examples and Notes
174
+
175
+ h4. Features
176
+
177
+ Feature path is relative to the project root. Consider the example project above:
178
+
179
+ <pre>
180
+ # run all features
181
+ cellophane
182
+
183
+ # run everything in admin
184
+ cellophane admin/*
185
+
186
+ # run everything in admin, except the reports
187
+ cellophane admin/*,~admin/reports/*
188
+
189
+ # run everything, except the admin reports
190
+ cellophane ~admin/reports/*
191
+
192
+ # run all user_maintenance features regardless of where they are
193
+ cellophane */user_maintenance/*
194
+
195
+ # run all features in files with email in the name
196
+ cellophane **/*email*
197
+
198
+ # or use a regular expression
199
+ cellophane -r email
200
+ </pre>
201
+
202
+ h4. Step Definitions
203
+
204
+ Cellophane does assume that your steps are defined in files that follow the naming of your features. For each feature file that is found, Cellophane will look for a step file with the same name and automatically require it. To require shared step definitions, put them in a folder and include that folder in the @requires@ section of @.cellophane.yaml@.
205
+
206
+ h4. Tags
207
+
208
+ You don't need to use @. You can you want, but it's not necessary.
209
+
210
+ Cellophane supports OR, AND, and NOT tags. Examples will probably illustrate better than words.
211
+
212
+ OR
213
+
214
+ <pre>
215
+ cellophane -t one,two
216
+ cucumber -t @one,@two
217
+ </pre>
218
+
219
+ AND
220
+
221
+ <pre>
222
+ cellophane -t one,+two
223
+ cucumber -t @one -t @two
224
+ </pre>
225
+
226
+ NOT
227
+
228
+ <pre>
229
+ cellophane -t one,~two
230
+ cucumber -t @one -t ~@two
231
+ </pre>
232
+
233
+ Mixed tags in a logical order
234
+
235
+ <pre>
236
+ cellophane -t one,two,~three,+four
237
+ cucumber -t @one,@two -t @four -t ~@three
238
+ </pre>
239
+
240
+ Mixed tags not in a logical order
241
+
242
+ <pre>
243
+ cellophane -t +four,one,~three,two
244
+ cucumber -t @one,@two -t @four -t ~@three
245
+ </pre>
246
+
247
+ I like to tag my scenarios with numeric values so I can easily run a specific scenario at any give time. It may sound a bit unusual, but I find it very handy.
248
+
249
+ Numeric OR ranges
250
+
251
+ <pre>
252
+ cellophane -t 1-3
253
+ cucumber -t @1,@2,@3
254
+ </pre>
255
+
256
+ Numeric NOT ranges
257
+
258
+ <pre>
259
+ cellophane -t ~1-3
260
+ cucumber -t ~@1 -t ~@2 -t ~@3
261
+ </pre>
262
+
263
+ Numeric OR range with a NOT
264
+
265
+ <pre>
266
+ cellophane -t 1-3,~2
267
+ cucumber -t @1,@3
268
+ </pre>
269
+
data/Rakefile ADDED
@@ -0,0 +1,25 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ require 'jeweler'
5
+ Jeweler::Tasks.new do |gem|
6
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
7
+ gem.name = "cellophane"
8
+ gem.homepage = "http://github.com/phillipkoebbe/cellophane"
9
+ gem.license = "MIT"
10
+ gem.summary = "A thin wrapper around Cucumber."
11
+ gem.description = "Cellophane is a thin wrapper around Cucumber, making it easier to be creative when running features."
12
+ gem.email = "phillip@livingdoor.net"
13
+ gem.authors = ["Phillip Koebbe"]
14
+ end
15
+ Jeweler::RubygemsDotOrgTasks.new
16
+
17
+ require 'rake/rdoctask'
18
+ Rake::RDocTask.new do |rdoc|
19
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
20
+
21
+ rdoc.rdoc_dir = 'rdoc'
22
+ rdoc.title = "cellophane #{version}"
23
+ rdoc.rdoc_files.include('README*')
24
+ rdoc.rdoc_files.include('lib/**/*.rb')
25
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/bin/cellophane ADDED
@@ -0,0 +1,14 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
4
+ require 'cellophane/main'
5
+
6
+ begin
7
+ Cellophane::Main.new.run
8
+ rescue SystemExit
9
+ # noop
10
+ rescue Exception => e
11
+ STDERR.puts("#{e.message} (#{e.class})")
12
+ STDERR.puts(e.backtrace.join("\n"))
13
+ Kernel.exit(1)
14
+ end
@@ -0,0 +1,29 @@
1
+ Feature: Feature paths
2
+
3
+ @1
4
+ Scenario: Standard feature path
5
+
6
+ Given a project directory with the following structure
7
+ | type | path |
8
+ | directory | features |
9
+ | directory | features/step_definitions |
10
+ When Cellophane is called with ""
11
+ Then the command should not include "features"
12
+ And the command should not include "-r features/step_definitions"
13
+
14
+ @2
15
+ Scenario: Non-standard feature path
16
+
17
+ Given a project directory with the following structure
18
+ | type | path |
19
+ | directory | cuke/features |
20
+ | directory | cuke/steps |
21
+ And a project options file with the following options
22
+ | option |
23
+ | feature_path: cuke/features |
24
+ | step_path: cuke/steps |
25
+ | requires: [cuke/support] |
26
+ When Cellophane is called with ""
27
+ Then the command should include "cuke/features"
28
+ And the command should include "-r cuke/steps"
29
+ And the command should include "-r cuke/support"
@@ -0,0 +1,173 @@
1
+ Feature: Glob Pattern
2
+
3
+ Background:
4
+
5
+ Given a project directory with the following structure
6
+ | type | path |
7
+ | directory | features |
8
+ | directory | features/admin |
9
+ | directory | features/user |
10
+ | directory | features/admin/comm |
11
+ | directory | features/user/comm |
12
+ | file | features/one.feature |
13
+ | file | features/two.feature |
14
+ | file | features/three.feature |
15
+ | file | features/four.feature |
16
+ | file | features/admin/one.feature |
17
+ | file | features/admin/two.feature |
18
+ | file | features/admin/three.feature |
19
+ | file | features/admin/four.feature |
20
+ | file | features/admin/comm/auto_email.feature |
21
+ | file | features/admin/comm/manual_email.feature |
22
+ | file | features/user/one.feature |
23
+ | file | features/user/two.feature |
24
+ | file | features/user/three.feature |
25
+ | file | features/user/four.feature |
26
+ | file | features/user/comm/auto_email.feature |
27
+ | file | features/user/comm/manual_email.feature |
28
+
29
+ @1
30
+ Scenario: No files match the pattern
31
+
32
+ When Cellophane is called with "somebadglobpattern"
33
+ Then the message should include "No features matching PATTERN were found"
34
+
35
+ @2
36
+ Scenario: Specific files in feature root
37
+
38
+ When Cellophane is called with "t*"
39
+ Then the command should include "features/two.feature"
40
+ And the command should include "features/three.feature"
41
+ And the command should not include "features/one.feature"
42
+ And the command should not include "features/four.feature"
43
+ And the command should not include "features/admin/one.feature"
44
+ And the command should not include "features/admin/two.feature"
45
+ And the command should not include "features/admin/three.feature"
46
+ And the command should not include "features/admin/four.feature"
47
+ And the command should not include "features/user/one.feature"
48
+ And the command should not include "features/user/two.feature"
49
+ And the command should not include "features/user/three.feature"
50
+ And the command should not include "features/user/four.feature"
51
+
52
+ @3
53
+ Scenario: Specific files in any subdirectory
54
+
55
+ When Cellophane is called with "**/t*"
56
+ Then the command should include "features/two.feature"
57
+ And the command should include "features/three.feature"
58
+ And the command should include "features/admin/two.feature"
59
+ And the command should include "features/admin/three.feature"
60
+ And the command should include "features/user/two.feature"
61
+ And the command should include "features/user/three.feature"
62
+ And the command should not include "features/one.feature"
63
+ And the command should not include "features/four.feature"
64
+ And the command should not include "features/admin/one.feature"
65
+ And the command should not include "features/admin/four.feature"
66
+ And the command should not include "features/user/one.feature"
67
+ And the command should not include "features/user/four.feature"
68
+
69
+ @4
70
+ Scenario: Specific files containing a string in the name
71
+
72
+ When Cellophane is called with "**/*email*"
73
+ Then the command should include "features/admin/comm/auto_email.feature"
74
+ And the command should include "features/admin/comm/manual_email.feature"
75
+ And the command should include "features/user/comm/auto_email.feature"
76
+ And the command should include "features/user/comm/manual_email.feature"
77
+ And the command should not include "features/one.feature"
78
+ And the command should not include "features/two.feature"
79
+ And the command should not include "features/three.feature"
80
+ And the command should not include "features/four.feature"
81
+ And the command should not include "features/admin/one.feature"
82
+ And the command should not include "features/admin/two.feature"
83
+ And the command should not include "features/admin/three.feature"
84
+ And the command should not include "features/admin/four.feature"
85
+ And the command should not include "features/user/one.feature"
86
+ And the command should not include "features/user/two.feature"
87
+ And the command should not include "features/user/three.feature"
88
+ And the command should not include "features/user/four.feature"
89
+
90
+ @5
91
+ Scenario: All files in a directory
92
+
93
+ When Cellophane is called with "admin/*"
94
+ Then the command should include "features/admin/one.feature"
95
+ And the command should include "features/admin/two.feature"
96
+ And the command should include "features/admin/three.feature"
97
+ And the command should include "features/admin/four.feature"
98
+ And the command should not include "features/one.feature"
99
+ And the command should not include "features/two.feature"
100
+ And the command should not include "features/three.feature"
101
+ And the command should not include "features/four.feature"
102
+ And the command should not include "features/user/one.feature"
103
+ And the command should not include "features/user/two.feature"
104
+ And the command should not include "features/user/three.feature"
105
+ And the command should not include "features/user/four.feature"
106
+
107
+ @6
108
+ Scenario: Exclude specific files in feature root
109
+
110
+ When Cellophane is called with "~t*"
111
+ Then the command should include "features/one.feature"
112
+ And the command should include "features/four.feature"
113
+ And the command should include "features/admin/one.feature"
114
+ And the command should include "features/admin/two.feature"
115
+ And the command should include "features/admin/three.feature"
116
+ And the command should include "features/admin/four.feature"
117
+ And the command should include "features/user/one.feature"
118
+ And the command should include "features/user/two.feature"
119
+ And the command should include "features/user/three.feature"
120
+ And the command should include "features/user/four.feature"
121
+ And the command should not include "features/two.feature"
122
+ And the command should not include "features/three.feature"
123
+
124
+ @7
125
+ Scenario: Exclude specific files in any subdirectory
126
+
127
+ When Cellophane is called with "~**/t*"
128
+ Then the command should include "features/one.feature"
129
+ And the command should include "features/four.feature"
130
+ And the command should include "features/admin/one.feature"
131
+ And the command should include "features/admin/four.feature"
132
+ And the command should include "features/user/one.feature"
133
+ And the command should include "features/user/four.feature"
134
+ And the command should not include "features/two.feature"
135
+ And the command should not include "features/three.feature"
136
+ And the command should not include "features/admin/two.feature"
137
+ And the command should not include "features/admin/three.feature"
138
+ And the command should not include "features/user/two.feature"
139
+ And the command should not include "features/user/three.feature"
140
+
141
+ @8
142
+ Scenario: Exclude all files in a directory
143
+
144
+ When Cellophane is called with "~admin/*"
145
+ Then the command should include "features/one.feature"
146
+ And the command should include "features/two.feature"
147
+ And the command should include "features/three.feature"
148
+ And the command should include "features/four.feature"
149
+ And the command should include "features/user/one.feature"
150
+ And the command should include "features/user/two.feature"
151
+ And the command should include "features/user/three.feature"
152
+ And the command should include "features/user/four.feature"
153
+ And the command should not include "features/admin/one.feature"
154
+ And the command should not include "features/admin/two.feature"
155
+ And the command should not include "features/admin/three.feature"
156
+ And the command should not include "features/admin/four.feature"
157
+
158
+ @9
159
+ Scenario: Include some, exclude others
160
+
161
+ When Cellophane is called with "admin/*,~admin/three"
162
+ Then the command should include "features/admin/one.feature"
163
+ And the command should include "features/admin/two.feature"
164
+ And the command should include "features/admin/four.feature"
165
+ And the command should not include "features/one.feature"
166
+ And the command should not include "features/two.feature"
167
+ And the command should not include "features/three.feature"
168
+ And the command should not include "features/four.feature"
169
+ And the command should not include "features/admin/three.feature"
170
+ And the command should not include "features/user/one.feature"
171
+ And the command should not include "features/user/two.feature"
172
+ And the command should not include "features/user/three.feature"
173
+ And the command should not include "features/user/four.feature"
@@ -0,0 +1,29 @@
1
+ Feature: Project Options
2
+
3
+ @1
4
+ Scenario: Load project specific options from a file
5
+
6
+ Given a project directory with the following structure
7
+ | type | path |
8
+ | directory | features |
9
+ | directory | features/step_definitions |
10
+ And a project options file with the following options
11
+ | option |
12
+ | cucumber: --format progress --no-profile |
13
+ When Cellophane is called with ""
14
+ Then the command should include "--format progress --no-profile"
15
+
16
+ @2
17
+ Scenario: Override with command line
18
+
19
+ Given a project directory with the following structure
20
+ | type | path |
21
+ | directory | features |
22
+ | directory | features/step_definitions |
23
+ And a project options file with the following options
24
+ | option |
25
+ | cucumber: --format progress --no-profile |
26
+ When Cellophane is called with "-c --format=pretty"
27
+ Then the command should include "--format=pretty"
28
+ And the command should not include "progress"
29
+ And the command should not include "--no-profile"
@@ -0,0 +1,94 @@
1
+ Feature: Regular Expression Pattern
2
+
3
+ Background:
4
+
5
+ Given a project directory with the following structure
6
+ | type | path |
7
+ | directory | features |
8
+ | directory | features/admin |
9
+ | directory | features/user |
10
+ | directory | features/admin/comm |
11
+ | directory | features/user/comm |
12
+ | file | features/one.feature |
13
+ | file | features/two.feature |
14
+ | file | features/three.feature |
15
+ | file | features/four.feature |
16
+ | file | features/admin/one.feature |
17
+ | file | features/admin/two.feature |
18
+ | file | features/admin/three.feature |
19
+ | file | features/admin/four.feature |
20
+ | file | features/admin/comm/auto_email.feature |
21
+ | file | features/admin/comm/manual_email.feature |
22
+ | file | features/user/one.feature |
23
+ | file | features/user/two.feature |
24
+ | file | features/user/three.feature |
25
+ | file | features/user/four.feature |
26
+ | file | features/user/comm/auto_email.feature |
27
+ | file | features/user/comm/manual_email.feature |
28
+
29
+ @1
30
+ Scenario: Features that match the pattern do not exist
31
+
32
+ When Cellophane is called with "-r somebadregularexpression"
33
+ Then the message should include "No features matching PATTERN were found"
34
+
35
+ @2
36
+ Scenario: An invalid regular expression is submitted
37
+
38
+ When Cellophane is called with "-r "
39
+ Then the message should include "Invalid regular expression provided"
40
+
41
+ @3
42
+ Scenario: Specific files
43
+
44
+ When Cellophane is called with "-r (?:one|four)"
45
+ Then the command should include "features/one.feature"
46
+ And the command should include "features/four.feature"
47
+ And the command should include "features/admin/one.feature"
48
+ And the command should include "features/admin/four.feature"
49
+ And the command should include "features/user/one.feature"
50
+ And the command should include "features/user/four.feature"
51
+ And the command should not include "features/two.feature"
52
+ And the command should not include "features/three.feature"
53
+ And the command should not include "features/admin/two.feature"
54
+ And the command should not include "features/admin/three.feature"
55
+ And the command should not include "features/user/two.feature"
56
+ And the command should not include "features/user/three.feature"
57
+
58
+ @4
59
+ Scenario: Specific files containing a string in the name
60
+
61
+ When Cellophane is called with "-r email"
62
+ Then the command should include "features/admin/comm/auto_email.feature"
63
+ And the command should include "features/admin/comm/manual_email.feature"
64
+ And the command should include "features/user/comm/auto_email.feature"
65
+ And the command should include "features/user/comm/manual_email.feature"
66
+ And the command should not include "features/one.feature"
67
+ And the command should not include "features/two.feature"
68
+ And the command should not include "features/three.feature"
69
+ And the command should not include "features/four.feature"
70
+ And the command should not include "features/admin/one.feature"
71
+ And the command should not include "features/admin/two.feature"
72
+ And the command should not include "features/admin/three.feature"
73
+ And the command should not include "features/admin/four.feature"
74
+ And the command should not include "features/user/one.feature"
75
+ And the command should not include "features/user/two.feature"
76
+ And the command should not include "features/user/three.feature"
77
+ And the command should not include "features/user/four.feature"
78
+
79
+ @5
80
+ Scenario: All files in a directory
81
+
82
+ When Cellophane is called with "-r \/admin\/"
83
+ And the command should include "features/admin/one.feature"
84
+ And the command should include "features/admin/two.feature"
85
+ And the command should include "features/admin/three.feature"
86
+ And the command should include "features/admin/four.feature"
87
+ And the command should not include "features/one.feature"
88
+ And the command should not include "features/two.feature"
89
+ And the command should not include "features/three.feature"
90
+ And the command should not include "features/four.feature"
91
+ And the command should not include "features/user/one.feature"
92
+ And the command should not include "features/user/two.feature"
93
+ And the command should not include "features/user/three.feature"
94
+ And the command should not include "features/user/four.feature"