Class: RSpec::Core::Runner
- Inherits:
-
Object
- Object
- RSpec::Core::Runner
- Defined in:
- lib/rspec/core/runner.rb
Class Method Summary collapse
- .invoke(lucian_engine = nil) ⇒ Object
- .run(args, err = $stderr, out = $stdout, lucian_engine = nil) ⇒ Object
Instance Method Summary collapse
-
#initialize(options, configuration = RSpec.configuration, world = RSpec.world, lucian_engine = nil) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(options, configuration = RSpec.configuration, world = RSpec.world, lucian_engine = nil) ⇒ Runner
26 27 28 29 30 31 32 33 |
# File 'lib/rspec/core/runner.rb', line 26 def initialize(, configuration=RSpec.configuration, world=RSpec.world, lucian_engine=nil) = @configuration = configuration if lucian_engine configuration.pattern = "**{,/*/**}/*_lucian.rb" end @world = world end |
Class Method Details
.invoke(lucian_engine = nil) ⇒ Object
3 4 5 6 7 |
# File 'lib/rspec/core/runner.rb', line 3 def self.invoke(lucian_engine=nil) disable_autorun! status = run(ARGV, $stderr, $stdout, lucian_engine).to_i exit(status) if status != 0 end |
.run(args, err = $stderr, out = $stdout, lucian_engine = nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rspec/core/runner.rb', line 9 def self.run(args, err=$stderr, out=$stdout, lucian_engine=nil) trap_interrupt = ConfigurationOptions.new(args) if .[:runner] .[:runner].call(, err, out) else if lucian_engine .[:full_description] = lucian_engine.examples if !lucian_engine.examples.nil? && lucian_engine.examples.count > 0 .[:formatters] = [["Lucian::CustomFormatter"]] unless ENV['LUCIAN_DOCKER'].nil? new(, RSpec.configuration, RSpec.world, lucian_engine).run(err, out) else new().run(err, out) end end end |