Class: Autotest::Jazrb

Inherits:
Autotest
  • Object
show all
Defined in:
lib/autotest/jazrb.rb

Instance Method Summary collapse

Constructor Details

#initializeJazrb

Returns a new instance of Jazrb.



30
31
32
33
34
# File 'lib/autotest/jazrb.rb', line 30

def initialize
  super
  self.failed_results_re = /^\d+\)\n(?:\e\[\d*m)?(?:.*?in )?'([^\n]*)'(?: FAILED)?(?:\e\[\d*m)?\n\n?(.*?(\n\n\(.*?)?)\n\n/m
  self.completed_re = /\n(?:\e\[\d*m)?\d* examples?/m
end

Instance Method Details

#consolidate_failures(failed) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/autotest/jazrb.rb', line 36

def consolidate_failures(failed)
  filters = new_hash_of_arrays
  failed.each do |spec, trace|
    if trace =~ /\n(\.\/)?(.*_spec\.js):[\d]+:/
      filters[$2] << spec
    end
    if trace =~ /\n(\.\/)?(.*Spec\.js):[\d]+:/
      filters[$2] << spec
    end
  end
  return filters
end

#make_test_cmd(files_to_test) ⇒ Object



49
50
51
52
53
# File 'lib/autotest/jazrb.rb', line 49

def make_test_cmd(files_to_test)
  return '' if files_to_test.empty?
  spec_program = "jazrb"
  return "#{spec_program} #{files_to_test.keys.flatten.join(' ')}"
end