Class: Evilution::Integration::RSpec::BaselineRunner Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evilution/integration/rspec/baseline_runner.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#call(spec_file) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/evilution/integration/rspec/baseline_runner.rb', line 6

def call(spec_file)
  require "rspec/core"
  # Anchor against PROJECT_ROOT under EV-wqxu sandbox CWD; see
  # FrameworkLoader#add_spec_load_path for rationale.
  spec_dir = File.expand_path("spec", Evilution.project_base_dir)
  $LOAD_PATH.unshift(spec_dir) unless $LOAD_PATH.include?(spec_dir)
  ::RSpec.reset
  status = ::RSpec::Core::Runner.run(
    ["--format", "progress", "--no-color", "--order", "defined", spec_file]
  )
  status.zero?
end