| Class | Spec::Runner::CommandLine |
| In: |
lib/spec/runner/command_line.rb
|
| Parent: | Object |
Runs specs. argv is the commandline args as per the spec commandline API, err and out are the streams output will be written to.
# File lib/spec/runner/command_line.rb, line 10
10: def run(instance_rspec_options)
11: # NOTE - this call to init_rspec_options is not spec'd, but neither is any of this
12: # swapping of $rspec_options. That is all here to enable rspec to run against itself
13: # and maintain coverage in a single process. Therefore, DO NOT mess with this stuff
14: # unless you know what you are doing!
15: init_rspec_options(instance_rspec_options)
16: orig_rspec_options = rspec_options
17: begin
18: $rspec_options = instance_rspec_options
19: return $rspec_options.run_examples
20: ensure
21: ::Spec.run = true
22: $rspec_options = orig_rspec_options
23: end
24: end