about summary refs log tree commit homepage
path: root/unicorn.gemspec
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-09-27 17:26:51 -0700
committerEric Wong <normalperson@yhbt.net>2009-09-27 17:26:51 -0700
commit9c00824720ec9be3b13ac8d66175e063c28885f0 (patch)
tree8e3f50757970c8e1ad65951840aca61ffcc537bb /unicorn.gemspec
parent68df54e341a118b6658cfe0dcd2ff9b006883d20 (diff)
downloadunicorn-9c00824720ec9be3b13ac8d66175e063c28885f0.tar.gz
This allows `gem check -t unicorn` to work.  The rest of
the tests run with GNU make but I don't have the patience
to get them working with pure-Ruby since I can't stand
running those tests sequentially anyways.
Diffstat (limited to 'unicorn.gemspec')
-rw-r--r--unicorn.gemspec10
1 files changed, 9 insertions, 1 deletions
diff --git a/unicorn.gemspec b/unicorn.gemspec
index f970a57..e7c9c91 100644
--- a/unicorn.gemspec
+++ b/unicorn.gemspec
@@ -3,6 +3,13 @@
 ENV["VERSION"] or abort "VERSION= must be specified"
 manifest = File.readlines('.manifest').map! { |x| x.chomp! }
 
+# don't bother with tests that fork, not worth our time to get working
+# with `gem check -t` ... (of course we care for them when testing with
+# GNU make when they can run in parallel)
+test_files = manifest.grep(%r{\Atest/unit/test_.*\.rb\z}).map do |f|
+  File.readlines(f).grep(/\bfork\b/).empty? ? f : nil
+end.compact
+
 Gem::Specification.new do |s|
   s.name = %q{unicorn}
   s.version = ENV["VERSION"]
@@ -33,7 +40,8 @@ Gem::Specification.new do |s|
   s.require_paths = %w(lib ext)
   s.rubyforge_project = %q{mongrel}
   s.summary = %q{Rack HTTP server for Unix and fast clients}
-  s.test_files = manifest.grep(%r{\Atest/unit/test_.*\.rb\z})
+
+  s.test_files = test_files
 
   s.add_dependency(%q<rack>)