autotest 4.2.6 → 4.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.2.6
1
+ 4.2.7
data/autotest.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{autotest}
8
- s.version = "4.2.6"
8
+ s.version = "4.2.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Davis"]
data/bin/autotest CHANGED
@@ -45,8 +45,8 @@ unless style.empty? then
45
45
  puts "loading #{mod}" unless options[:quiet]
46
46
  begin
47
47
  require mod
48
- rescue LoadError
49
- abort "Autotest style #{mod} doesn't seem to exist. Aborting."
48
+ rescue LoadError => e
49
+ abort "Error loading Autotest style #{mod} (#{e.to_s}). Aborting."
50
50
  end
51
51
  puts "style: #{style.map {|s| s.capitalize}.join}"
52
52
  target = Autotest.const_get(style.map {|s| s.capitalize}.join)
data/lib/autotest.rb CHANGED
@@ -157,8 +157,6 @@ class Autotest
157
157
  @exception_list = []
158
158
  @test_mappings = []
159
159
 
160
- ENV['UNIT_DIFF'] ||= File.expand_path("#{File.dirname(__FILE__)}/../bin/unit_diff")
161
-
162
160
  self.completed_re = /\d+ tests, \d+ assertions, \d+ failures, \d+ errors/
163
161
  self.extra_class_map = {}
164
162
  self.extra_files = []
@@ -172,7 +170,7 @@ class Autotest
172
170
  self.sleep = 1
173
171
  self.testlib = "test/unit"
174
172
  self.find_directories = ['.']
175
- self.unit_diff = "#{ENV['UNIT_DIFF']} -u"
173
+ self.unit_diff = "#{File.expand_path("#{File.dirname(__FILE__)}/../bin/unit_diff")} -u"
176
174
 
177
175
  #add Test::Unit mappings
178
176
  #file in /lib -> run test in /test
@@ -362,8 +362,10 @@ test_error2(#{@test_class}):
362
362
  'test/test_fooby.rb' => [ 'test_something1', 'test_something2' ]
363
363
  }
364
364
 
365
- expected = [ "#{RUBY} -I.:lib:test -rubygems -e \"%w[test/unit #{@test}].each { |f| require f }\" | #{ENV['UNIT_DIFF']} -u",
366
- "#{RUBY} -I.:lib:test -rubygems test/test_fooby.rb -n \"/^(test_something1|test_something2)$/\" | #{ENV['UNIT_DIFF']} -u" ].join("; ")
365
+ unit_diff = File.expand_path("#{File.dirname(__FILE__)}/../bin/unit_diff")
366
+
367
+ expected = [ "#{RUBY} -I.:lib:test -rubygems -e \"%w[test/unit #{@test}].each { |f| require f }\" | #{unit_diff} -u",
368
+ "#{RUBY} -I.:lib:test -rubygems test/test_fooby.rb -n \"/^(test_something1|test_something2)$/\" | #{unit_diff} -u" ].join("; ")
367
369
 
368
370
  result = @a.make_test_cmd f
369
371
  assert_equal expected, result
@@ -11,12 +11,8 @@ class TestAutotestIntegration < Test::Unit::TestCase
11
11
  '../../bin/autotest'
12
12
  end
13
13
 
14
- def unit_diff_executable
15
- File.expand_path("./#{File.dirname(__FILE__)}/../bin/unit_diff")
16
- end
17
-
18
14
  def run_autotest(flag_string='')
19
- `cd #{temp_dir} && #{autotest_executable} #{flag_string}`
15
+ `cd #{temp_dir} && #{autotest_executable} #{flag_string}`
20
16
  end
21
17
 
22
18
  def write(file, text)
@@ -33,7 +29,6 @@ class TestAutotestIntegration < Test::Unit::TestCase
33
29
  context 'integration' do
34
30
  context 'green run' do
35
31
  setup do
36
- ENV['UNIT_DIFF'] = unit_diff_executable
37
32
  `rm -rf #{temp_dir}`
38
33
  `mkdir #{temp_dir}`
39
34
  write('.autotest', "Autotest.add_hook(:all_good){print 'all_good';exit}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autotest
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.6
4
+ version: 4.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis