Class: MSpecCI
- Inherits:
-
MSpecScript
- Object
- MSpecScript
- MSpecCI
- Defined in:
- lib/mspec/commands/mspec-ci.rb
Instance Method Summary collapse
Methods inherited from MSpecScript
config, #config, #custom_options, #custom_register, #entries, #files, get, #initialize, #load, #load_default, main, #register, set, #signals
Constructor Details
This class inherits a constructor from MSpecScript
Instance Method Details
#options(argv = ARGV) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/mspec/commands/mspec-ci.rb', line 11 def (argv=ARGV) = MSpecOptions.new "mspec ci [options] (FILE|DIRECTORY|GLOB)+", 30, config .doc " Ask yourself:" .doc " 1. How to run the specs?" .doc " 2. How to modify the guard behavior?" .doc " 2. How to display the output?" .doc " 3. What action to perform?" .doc " 4. When to perform it?" .doc "\n How to run the specs" .chdir .prefix .configure { |f| load f } .name .pretend .background .interrupt .doc "\n How to modify the guard behavior" .unguarded .verify .doc "\n How to display their output" .formatters .verbose .doc "\n What action to perform" .actions .doc "\n When to perform it" .action_filters .doc "\n Help!" .debug .version MSpec::VERSION .help .doc "\n Custom options" .doc "\n How might this work in the real world?" .doc "\n 1. To simply run the known good specs" .doc "\n $ mspec ci" .doc "\n 2. To run a subset of the known good specs" .doc "\n $ mspec ci path/to/specs" .doc "\n 3. To start the debugger before the spec matching 'this crashes'" .doc "\n $ mspec ci --spec-debug -S 'this crashes'" .doc "" patterns = .parse argv patterns = config[:ci_files] if patterns.empty? @files = files patterns end |
#run ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/mspec/commands/mspec-ci.rb', line 66 def run MSpec. config[:tags_patterns] MSpec.register_files @files = ["fails", "critical", "unstable", "incomplete", "unsupported"] += Array(config[:ci_xtags]) filter = TagFilter.new(:exclude, *) filter.register MSpec.process exit MSpec.exit_code end |