Class: QUnited::Driver::Rhino
- Defined in:
- lib/qunited/driver/rhino/rhino.rb
Constant Summary collapse
- JS_JAR =
File.('../support/js.jar', __FILE__)
- ENV_JS =
File.('../support/env.rhino.js', __FILE__)
- RUNNER_JS =
File.('../support/runner.js', __FILE__)
Constants inherited from Base
Base::COFFEESCRIPT_EXTENSIONS, Base::SUPPORT_DIR, Base::TEST_RESULT_END_TOKEN, Base::TEST_RESULT_REGEX, Base::TEST_RESULT_START_TOKEN
Instance Attribute Summary
Attributes inherited from Base
#fixture_files, #formatter, #results, #source_files, #test_files
Class Method Summary collapse
-
.available? ⇒ Boolean
Determines whether this driver available to use.
Instance Method Summary collapse
Methods inherited from Base
#initialize, #name, #run, #support_file_contents, #support_file_path, which
Constructor Details
This class inherits a constructor from QUnited::Driver::Base
Class Method Details
.available? ⇒ Boolean
Determines whether this driver available to use. Checks whether java is on the PATH and whether Java is version 1.1 or greater.
14 15 16 17 18 19 20 21 22 23 24 25 |
# 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 |