class Simulacrum::Runner

Base Runner class for running RSpec in parallel.

Attributes

exit_code[R]

Public Class Methods

new() click to toggle source
# File lib/simulacrum/runner.rb, line 12
def initialize
  configure_driver
  configure_rspec
end

Public Instance Methods

run() click to toggle source
# File lib/simulacrum/runner.rb, line 17
def run
  @exit_code = run_rspec
end

Private Instance Methods

configure_driver() click to toggle source
# File lib/simulacrum/runner.rb, line 23
def configure_driver
  Simulacrum::Driver.use
end
configure_rspec() click to toggle source
# File lib/simulacrum/runner.rb, line 35
def configure_rspec
  RSpec.configuration.include Simulacrum::Matchers
  RSpec.configuration.extend Simulacrum::Methods
  RSpec.configuration.color = Simulacrum.runner_options.color
  RSpec.configuration.tty = true
  RSpec.configuration.pattern = '**/*_spec.rb'
  RSpec.configuration.profile_examples = false
end
run_rspec() click to toggle source
# File lib/simulacrum/runner.rb, line 27
def run_rspec
  RSpec::Core::Runner.run(test_files)
end
test_files() click to toggle source
# File lib/simulacrum/runner.rb, line 31
def test_files
  Simulacrum.runner_options.files
end