Sha256: e91ee861b33348fd358dfe0b9d949814bf7627471e6eac69bcf6f972ac191fe1

Contents?: true

Size: 463 Bytes

Versions: 16

Compression:

Stored size: 463 Bytes

Contents

module Project
  class TestsRunner
    def self.call(project)
      runner = new(project)
      yield runner if block_given?
      runner.call
    end

    attr_reader :project
    attr_accessor :command

    def initialize(project)
      @project = project
      self.command = project.test_runner_command
    end

    def call
      match = command.match(/^((?:\w+=[^ ]+ )*)(.+)$/)
      project.run_command_within(match[2], :env => match[1])
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rr-3.1.1 spec/support/project/tests_runner.rb
rr-3.1.0 spec/support/project/tests_runner.rb
rr-3.0.9 spec/support/project/tests_runner.rb
rr-3.0.8 spec/support/project/tests_runner.rb
rr-3.0.7 spec/support/project/tests_runner.rb
rr-3.0.6 spec/support/project/tests_runner.rb
rr-3.0.5 spec/support/project/tests_runner.rb
rr-3.0.4 spec/support/project/tests_runner.rb
rr-3.0.3 spec/support/project/tests_runner.rb
rr-3.0.2 spec/support/project/tests_runner.rb
rr-3.0.1 spec/support/project/tests_runner.rb
rr-3.0.0 spec/support/project/tests_runner.rb
rr-1.2.1 spec/support/project/tests_runner.rb
rr-1.2.0 spec/support/project/tests_runner.rb
rr-1.1.2 spec/support/project/tests_runner.rb
rr-1.1.2.rc1 spec/support/project/tests_runner.rb