@@ -138,6 +138,30 @@ $ snapdragon spec/javascripts
138
138
$ snapdragon spec/javascript custom_js/tests/foo_spec.js custom_js/test/bar_spec.js
139
139
` ` `
140
140
141
+ #### Run test files matched by default pattern (` spec/**/*_spec.js` )
142
+
143
+ ` ` ` text
144
+ $ snapdragon
145
+ ` ` `
146
+
147
+ #### Run test files matched by custom pattern
148
+
149
+ The following is an example command that specifies a custom pattern to use to
150
+ match test files to run . Please note the double quote marks around the
151
+ pattern . These are necessary as without them most shells will try and resolve
152
+ the pattern for you . Further details on the glob syntax can be found
153
+ [here](http: // ruby-doc.org/core-2.0.0/Dir.html#method-c-glob).
154
+
155
+ ` ` ` text
156
+ $ snapdragon -P "spec/assets/javascripts/foo/*_spec.js"
157
+ ` ` `
158
+
159
+ #### Output Usage Details/ Help
160
+
161
+ ` ` ` text
162
+ $ snapdragon --help
163
+ ` ` `
164
+
141
165
## Usage (snapdragon_server)
142
166
143
167
The * snapdragon_server* command allows you to run your
@@ -157,13 +181,13 @@ The following runs the describe or it block that corresponds to line number
157
181
$ snapdragon_server spec/javascript/foo_spec.js:23
158
182
` ` `
159
183
160
- #### Run specific spec files
184
+ #### Run an entire spec file (s)
161
185
162
186
` ` ` text
163
187
$ snapdragon_server spec/javascript/foo_spec.js spec/javascript/bar_spec.js
164
188
` ` `
165
189
166
- #### Run all the specs in directories
190
+ #### Run an entire directory of spec files
167
191
168
192
The following recursively explores the given directories contents for
169
193
files that end in ` spec.js` or ` Spec.js` and runs the tests in the identified
@@ -173,12 +197,82 @@ spec files.
173
197
$ snapdragon_server spec/javascript custom_js/specs
174
198
` ` `
175
199
176
- #### Combine files and directories
200
+ #### Run combination of files and directories
177
201
178
202
` ` ` text
179
203
$ snapdragon_server spec/javascript custom_js/tests/foo_spec.js custom_js/test/bar_spec.js
180
204
` ` `
181
205
206
+ #### Run test files matched by default pattern (` spec/**/*_spec.js` )
207
+
208
+ ` ` ` text
209
+ $ snapdragon_server
210
+ ` ` `
211
+
212
+ #### Run test files matched by custom pattern
213
+
214
+ The following is an example command that specifies a custom pattern to use to
215
+ match test files to run . Please note the double quote marks around the
216
+ pattern . These are necessary as without them most shells will try and resolve
217
+ the pattern for you . Further details on the glob syntax can be found
218
+ [here](http: // ruby-doc.org/core-2.0.0/Dir.html#method-c-glob).
219
+
220
+ ` ` ` text
221
+ $ snapdragon_server -P "spec/assets/javascripts/foo/*_spec.js"
222
+ ` ` `
223
+
224
+ #### Output Usage Details/ Help
225
+
226
+ ` ` ` text
227
+ $ snapdragon_server --help
228
+ ` ` `
229
+
230
+ ### Additional Options
231
+
232
+ Below is a listing of the various options that can be passed to either the
233
+ ` snapdragon` or ` snapdragon_server` commands.
234
+
235
+ #### Version (` -v` , ` --version` )
236
+
237
+ When given this option it will output the version that you are using
238
+ and exit without running any tests.
239
+
240
+ #### Help (` -h` , ` --help` )
241
+
242
+ When given this option it will output basic usage summary and exit without
243
+ running any tests.
244
+
245
+ #### Format (` -f FORMAT` , ` --format FORMAT` )
246
+
247
+ This option allows you to specify the output format of the tests . By default
248
+ it outputs using the ` console` format . This option is extremely useful when
249
+ you would like to use ` snapdragon` inside of a CI process because you can
250
+ instruct it to output in other formats such as ` junit` which CI services
251
+ can parse.
252
+
253
+ The following are the currently supported ` FORMAT` values.
254
+
255
+ * ` console` (default)
256
+ * ` junit`
257
+
258
+ #### Color (` --no-color` , ` --no-colour` )
259
+
260
+ If you would like to disable ANSI color output which is enabled by default,
261
+ include either the ` --no-color` or ` --no-colour` option.
262
+
263
+ #### Pattern (` -P PATTERN` , ` --pattern PATTERN` )
264
+
265
+ When this option is not given and no file or directory paths are given it
266
+ uses the default pattern ` "spec/**/*_spec.js"` .
267
+
268
+ When given this option without any explicit file paths or directory paths it
269
+ will use the provided glob pattern to identify which test files to run . Any
270
+ example usage of this option can be seen above in the * Run test files matched
271
+ by custom pattern* section . For more details on the glob pattern syntax please
272
+ refer to the [Ruby
273
+ Dir .glob ](http: // ruby-doc.org/core-2.0.0/Dir.html#method-c-glob)
274
+ documentation.
275
+
182
276
## // require_relative() directive
183
277
184
278
Snapdragon also provides a ` // require_relative()` directive that the
0 commit comments