Permalink
Browse files

Avoid segfault on 1.9.2p0 when running all tests together. Fixes GH #52.

  • Loading branch information...
1 parent 739b6ba commit 0dd5749d8ef4144b5f779a1a197b6bfe300acdc4 @rkh rkh committed Sep 6, 2010
Showing with 14 additions and 4 deletions.
  1. +14 −4 Rakefile
View
@@ -13,10 +13,20 @@ end
# SPECS ===============================================================
-Rake::TestTask.new(:test) do |t|
- t.test_files = FileList['test/*_test.rb']
- t.ruby_opts = ['-rubygems'] if defined? Gem
- t.ruby_opts << '-I.'
+if !ENV['NO_TEST_FIX'] and RUBY_VERSION == '1.9.2' and RUBY_PATCHLEVEL == 0
+ # Avoids seg fault
+ task(:test) do
+ files = Dir.glob('test/*_test.rb')
+ files.delete 'test/settings_test.rb'
+ sh "testrb #{files.join ' '}"
+ sh "testrb test/settings_test.rb"
+ end
+else
+ Rake::TestTask.new(:test) do |t|
+ t.test_files = FileList['test/*_test.rb']
+ t.ruby_opts = ['-rubygems'] if defined? Gem
+ t.ruby_opts << '-I.'
+ end
end
# Rcov ================================================================

0 comments on commit 0dd5749

Please sign in to comment.