class QUnited::Driver::Rhino
Constants
- ENV_JS
- JS_JAR
- RUNNER_JS
Public Class Methods
available?()
click to toggle source
Determines whether this driver available to use. Checks whether java is on the PATH and whether Java is version 1.1 or greater.
# File lib/qunited/driver/rhino/rhino.rb, line 14 def self.available? java_exe = which('java') if java_exe stdin, stdout, stderr = Open3.popen3('java -version') begin version = Float(stderr.read.split("\n").first[/(\d+\.\d+)/, 1]) version >= 1.1 rescue false end end end
Public Instance Methods
command()
click to toggle source
# File lib/qunited/driver/rhino/rhino.rb, line 27 def command %|java -jar "#{JS_JAR}" -opt -1 #{RUNNER_JS} #{ENV_JS} #{@tests_file.path}| end