Sha256: 15c1863cc419fd424f30962ac8dbc4338f5b7c670e65e3af50b4d1414c409f7e

Contents?: true

Size: 635 Bytes

Versions: 3

Compression:

Stored size: 635 Bytes

Contents

class JsTestDriverRunner

  def initialize(dir, jar, filter, server)
    @config = dir + '/jsTestDriver.conf'
    @dir = dir
    @jar = jar
    @filter = filter
    @server = server
  end

  def name
    return 'JS Test Driver'
  end

  def execute
    @server.start_if_required
    return `java -jar "#{@jar}" --config "#{@config}" --captureConsole --reset --tests all 2>&1`
  end

  def is_configured?(all_files)
    return all_files.include?(@dir + '/jsTestDriver.conf')
  end

  def should_run?(modified_files)
    return !(modified_files.detect { |file| @filter.filter(file)  }).nil? || modified_files.include?(@config)
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
loris-0.5.2 lib/tasks/js_test_driver/js_test_driver_runner.rb
loris-0.5.1 lib/tasks/js_test_driver/js_test_driver_runner.rb
loris-0.5.0 lib/tasks/js_test_driver/js_test_driver_runner.rb