Class: Sauce::JSUnit::RunUtils

Inherits:
Object
  • Object
show all
Defined in:
lib/sauce/jsunit/run_utils.rb

Class Method Summary collapse

Class Method Details

.run(command, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/sauce/jsunit/run_utils.rb', line 4

def self.run(command, options = {})
  default_options = {
    :raise_on_fail => true
  }
  options = default_options.merge(options)
  puts "Executing: #{command}"
  success = system(command)
  if !success && options[:raise_on_fail]
    raise "Command failed: #{command}"
  end
  success
end