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

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

Instance Method Summary collapse

Instance Method Details

#call(spec_file) ⇒ Object



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

def call(spec_file)
  require "rspec/core"
  spec_dir = File.expand_path("spec")
  $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