11: def options(argv=ARGV)
12: options = MSpecOptions.new "mspec ci [options] (FILE|DIRECTORY|GLOB)+", 30, config
13:
14: options.doc " Ask yourself:"
15: options.doc " 1. How to run the specs?"
16: options.doc " 2. How to modify the guard behavior?"
17: options.doc " 2. How to display the output?"
18: options.doc " 3. What action to perform?"
19: options.doc " 4. When to perform it?"
20:
21: options.doc "\n How to run the specs"
22: options.chdir
23: options.prefix
24: options.configure { |f| load f }
25: options.name
26: options.pretend
27: options.background
28: options.interrupt
29:
30: options.doc "\n How to modify the guard behavior"
31: options.unguarded
32: options.verify
33:
34: options.doc "\n How to display their output"
35: options.formatters
36: options.verbose
37:
38: options.doc "\n What action to perform"
39: options.actions
40:
41: options.doc "\n When to perform it"
42: options.action_filters
43:
44: options.doc "\n Help!"
45: options.debug
46: options.version MSpec::VERSION
47: options.help
48:
49: options.doc "\n Custom options"
50: custom_options options
51:
52: options.doc "\n How might this work in the real world?"
53: options.doc "\n 1. To simply run the known good specs"
54: options.doc "\n $ mspec ci"
55: options.doc "\n 2. To run a subset of the known good specs"
56: options.doc "\n $ mspec ci path/to/specs"
57: options.doc "\n 3. To start the debugger before the spec matching 'this crashes'"
58: options.doc "\n $ mspec ci --spec-debug -S 'this crashes'"
59: options.doc ""
60:
61: patterns = options.parse argv
62: patterns = config[:ci_files] if patterns.empty?
63: @files = files patterns
64: end