Rakefile in rake-0.5.0 vs Rakefile in rake-0.5.3
- old
+ new
@@ -17,10 +17,11 @@
require 'rake/rdoctask'
CLEAN.include('**/*.o')
CLOBBER.include('doc/example/main', 'testdata')
CLOBBER.include('test/data/**/temp_*')
+CLOBBER.include('test/data/chains/play.*')
def announce(msg='')
STDERR.puts msg
end
@@ -43,54 +44,60 @@
SRC_RB = FileList['lib/**/*.rb']
# The default task is run if rake is given no explicit arguments.
desc "Default Task"
-task :default => :testall
+task :default => :alltests
# Test Tasks ---------------------------------------------------------
-Rake::TestTask.new(:testall) do |t|
+task :a => :alltests
+task :f => :funtests
+task :u => :unittests
+task :c => :contribtests
+
+Rake::TestTask.new(:alltests) do |t|
t.test_files = FileList[
'test/test*.rb',
'test/contrib/test*.rb',
'test/fun*.rb'
]
t.warning = true if t.respond_to? :warning
t.verbose = true
end
-Rake::TestTask.new(:test) do |t|
+Rake::TestTask.new(:unittests) do |t|
t.test_files = FileList['test/test*.rb']
t.warning = true if t.respond_to? :warning
t.verbose = true
end
-Rake::TestTask.new(:testfun) do |t|
+Rake::TestTask.new(:funtests) do |t|
t.pattern = 'test/fun*.rb'
t.warning = true if t.respond_to? :warning
end
-Rake::TestTask.new(:testcontrib) do |t|
+Rake::TestTask.new(:contribtests) do |t|
t.pattern = 'test/contrib/test*.rb'
t.verbose = true
t.warning = true if t.respond_to? :warning
end
directory 'testdata'
-task :test => ['testdata']
+[:alltests, :unittests, :contribtests, :funtests].each do |t|
+ task t => ['testdata']
+end
-
# Abbreviations
-task :ta => [:testall]
-task :tf => [:testfun]
-task :tc => [:testcontrib]
+task :a => [:alltests]
+task :u => [:unittests]
+task :f => [:funtests]
+task :c => [:contribtests]
# CVS Tasks ----------------------------------------------------------
-
# Install rake using the standard install.rb script.
desc "Install the application"
task :install do
ruby "install.rb"
@@ -266,10 +273,10 @@
desc "Make a new release"
task :release => [
:prerelease,
:clobber,
- :testall,
+ :alltests,
:update_version,
:package,
:tag] do
announce