autotest 4.4.4 → 4.4.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,3 +4,4 @@ gem 'rake'
4
4
  gem 'shoulda'
5
5
  gem 'rspec', '~>2'
6
6
  gem 'jeweler'
7
+ gem 'parallel_tests'
@@ -9,6 +9,9 @@ GEM
9
9
  git (>= 1.2.5)
10
10
  rubyforge (>= 2.0.0)
11
11
  json_pure (1.4.6)
12
+ parallel (0.5.1)
13
+ parallel_tests (0.4.7)
14
+ parallel
12
15
  rake (0.8.7)
13
16
  rspec (2.0.1)
14
17
  rspec-core (~> 2.0.1)
@@ -29,6 +32,7 @@ PLATFORMS
29
32
 
30
33
  DEPENDENCIES
31
34
  jeweler
35
+ parallel_tests
32
36
  rake
33
37
  rspec (~> 2)
34
38
  shoulda
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.4.4
1
+ 4.4.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{autotest}
8
- s.version = "4.4.4"
8
+ s.version = "4.4.5"
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"]
12
- s.date = %q{2010-11-16}
12
+ s.date = %q{2010-11-20}
13
13
  s.executables = ["autotest", "unit_diff"]
14
14
  s.files = [
15
15
  ".autotest",
@@ -452,12 +452,13 @@ class Autotest
452
452
  base_cmd = "#{bundle_exec}#{ruby} -I#{libs} -rubygems"
453
453
 
454
454
  unless full.empty? then
455
- classes = full.map {|k,v| k}.flatten.uniq
456
- if options[:parallel] and classes.size > 1
457
- cmds << "#{bundle_exec}parallel_test #{escape_filenames(classes).join(' ')}"
455
+ files = full.map {|k,v| k}.flatten.uniq
456
+ if options[:parallel] and files.size > 1
457
+ files = files.map{|file| File.expand_path(file) } if RUBY19
458
+ cmds << "#{bundle_exec}parallel_test #{escape_filenames(files).join(' ')}"
458
459
  else
459
- classes.unshift testlib
460
- cmds << "#{base_cmd} -e \"[#{escape_filenames(classes).join(', ')}].each { |f| require f }\" | #{unit_diff}"
460
+ files.unshift testlib
461
+ cmds << "#{base_cmd} -e \"[#{escape_filenames(files).join(', ')}].each { |f| require f }\" | #{unit_diff}"
461
462
  end
462
463
  end
463
464
 
@@ -67,7 +67,7 @@ class TestAutotestIntegration < Test::Unit::TestCase
67
67
  write_passing_tests 1
68
68
  assert_match /\n#{%w[ran_command green all_good died]*''}$/m, run_autotest
69
69
  end
70
-
70
+
71
71
  should 'run with alternate config file location' do
72
72
  write('.autotest_alternate', "Autotest.add_hook(:all_good){print 'all_good';exit}")
73
73
  assert_equal run_autotest('-r .autotest_alternate'), 'all_good'
@@ -82,6 +82,14 @@ class TestAutotestIntegration < Test::Unit::TestCase
82
82
  write('spec/a_spec.rb', "print 'YES'")
83
83
  assert_match %r{YES}, run_autotest('--style rspec2')
84
84
  end
85
+
86
+ should 'run in parallel' do
87
+ write('test/test_a.rb', "require 'test/unit';print 'YES'")
88
+ write('test/test_b.rb', "require 'test/unit';print 'YEP'")
89
+ result = run_autotest('--parallel')
90
+ assert_match %r{YES}, result
91
+ assert_match %r{YEP}, result
92
+ end
85
93
  end
86
94
  end
87
95
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autotest
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
5
4
  prerelease: false
6
5
  segments:
7
6
  - 4
8
7
  - 4
9
- - 4
10
- version: 4.4.4
8
+ - 5
9
+ version: 4.4.5
11
10
  platform: ruby
12
11
  authors:
13
12
  - Ryan Davis
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-11-16 00:00:00 +01:00
17
+ date: 2010-11-20 00:00:00 +01:00
19
18
  default_executable:
20
19
  dependencies: []
21
20
 
@@ -67,7 +66,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
66
  requirements:
68
67
  - - ">="
69
68
  - !ruby/object:Gem::Version
70
- hash: 3
69
+ hash: 1006120333
71
70
  segments:
72
71
  - 0
73
72
  version: "0"
@@ -76,7 +75,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
75
  requirements:
77
76
  - - ">="
78
77
  - !ruby/object:Gem::Version
79
- hash: 3
80
78
  segments:
81
79
  - 0
82
80
  version: "0"