Class: Autotest::Micronaut
- Defined in:
- lib/autotest/micronaut.rb
Instance Method Summary collapse
- #consolidate_failures(failed) ⇒ Object
-
#initialize ⇒ Micronaut
constructor
A new instance of Micronaut.
- #make_test_cmd(files_to_test) ⇒ Object
Constructor Details
#initialize ⇒ Micronaut
Returns a new instance of Micronaut.
24 25 26 27 28 |
# File 'lib/autotest/micronaut.rb', line 24 def initialize super self.failed_results_re = /^\d+\)\n(?:\e\[\d*m)?(?:.*?Error in )?'([^\n]*)'(?: FAILED)?(?:\e\[\d*m)?\n(.*?)\n\n/m self.completed_re = /\n(?:\e\[\d*m)?\d* examples?/m end |
Instance Method Details
#consolidate_failures(failed) ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/autotest/micronaut.rb', line 30 def consolidate_failures(failed) filters = new_hash_of_arrays failed.each do |spec, trace| if trace =~ /\n(\.\/)?(.*example\.rb):[\d]+:\Z?/ filters[$2] << spec end end return filters end |
#make_test_cmd(files_to_test) ⇒ Object
40 41 42 43 |
# File 'lib/autotest/micronaut.rb', line 40 def make_test_cmd(files_to_test) return '' if files_to_test.size == 0 "bin/micronaut #{files_to_test.keys.join(' ')}" end |