Skip to content

Commit

Permalink
Avoid segfault on 1.9.2p0 when running all tests together. Fixes GH s…
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Sep 6, 2010
1 parent 739b6ba commit 0dd5749
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Rakefile
Expand Up @@ -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 ================================================================
Expand Down

0 comments on commit 0dd5749

Please sign in to comment.