Rakefile in sinatra-1.1.2 vs Rakefile in sinatra-1.1.3
- old
+ new
@@ -4,10 +4,12 @@
require 'date'
task :default => :test
task :spec => :test
+CLEAN.include "**/*.rbc"
+
def source_version
line = File.read('lib/sinatra/base.rb')[/^\s*VERSION = .*/]
line.match(/.*VERSION = '(.*)'/)[1]
end
@@ -15,24 +17,14 @@
task :test do
ENV['LANG'] = 'C'
ENV.delete 'LC_CTYPE'
end
-if !ENV['NO_TEST_FIX'] and RUBY_VERSION == '1.9.2' and RUBY_PATCHLEVEL == 0
- # Avoids seg fault
- task(:test) do
- second_run = %w[settings rdoc markaby templates static textile].map { |l| "test/#{l}_test.rb" }
- first_run = Dir.glob('test/*_test.rb') - second_run
- [first_run, second_run].each { |f| sh "testrb #{f.join ' '}" }
- 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
+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
-
# Rcov ================================================================
namespace :test do
desc 'Mesures test coverage'
task :coverage do
rm_f "coverage"