Class: QUnited::Driver::PhantomJs

Inherits:
Base
  • Object
show all
Defined in:
lib/qunited/driver/phantomjs/phantomjs.rb

Constant Summary collapse

RUNNER_JS =
File.expand_path('../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

Instance Method Summary collapse

Methods inherited from Base

#initialize, #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 phantomjs is on the PATH.

Returns:

  • (Boolean)


14
15
16
# File 'lib/qunited/driver/phantomjs/phantomjs.rb', line 14

def self.available?
  !!which('phantomjs')
end

Instance Method Details

#commandObject



22
23
24
# File 'lib/qunited/driver/phantomjs/phantomjs.rb', line 22

def command
  %|phantomjs "#{RUNNER_JS}" "#{@tests_file.path}"|
end

#nameObject



18
19
20
# File 'lib/qunited/driver/phantomjs/phantomjs.rb', line 18

def name
  'PhantomJS'
end