On Thursday 09 September 2004 02:12 am, Jim Weirich wrote:
> Could you provide a specific example of how you use this?

Not sure what you mean, but here's a very basic example.

BTW, it doesn't seem like there is much demand for such a feature built 
directly into rake. Not that it's a bad idea of anything, but unless you have 
a keen interest otherwise, I'll just withdraw my proposal.


# RAKE.YAML ----------------------------------------------------
# tests
PKG_TEST_DIR: test
PKG_TEST_FILES:
  - 'test/*_test.rb'
  - 'test/**/*_test.rb'


# RAKEFORM -----------------------------------------------------
require 'rake'
require 'rake/testtask'

#################################################
# load config from Rake.yaml and make constants #
#################################################
YAML::load( File.open('Rake.yaml') ).each{|c,v| self.class.const_set(c,v)}

##
# = Default Task
##
desc "Default Task (test)"
task :default => [ :test ]

##
# = Run Unit Tests
##
Rake::TestTask.new("test") { |t|
  #t.desc "Run all tests"
  t.libs << PKG_TEST_DIR
  PKG_TEST_FILES.each { |pat| t.pattern = pat }
  t.verbose = true
}


-- 
T.