From: Daniel Berger Date: 2009-02-20T03:16:14+09:00 Subject: Re: Rake post test task On Feb 19, 11:10 am, Daniel Berger wrote: > On Feb 19, 10:07 am, Rick DeNatale wrote: > > > > > > > The way I'd approach this would be to have tasks for whatever sequences of > > subtasks make sense, so something like: > > >   desc "clean up" > >   task :clean do |t| > >     puts "cleaning up" > >   end > > >   desc "test" > >   task :test do |t| > >     puts "testing" > >   end > > >   desc "test and clean up" > >   task :test_and_cleanup => [:test, :clean] > > >   desc "clean up then test" > >   task :cleanup_and_test => [:clean, :test] > > > Task names could be adjusted, so if you wanted to normally clean up and then > > test, or test and then clean up you could rename > > the 'normal' task, .e.g :test becomes something like :test_only and > > :cleanup_and_test becomes :test > > Hm, maybe I should just create a separate task as you say. Upon further review that won't work, because the :clean task is already a prerequisite for the :build task. So, what I'm really doing is "clean, build, test, clean". It may seem redundant, but sometimes I do the ol' "ruby extconf.rb; make" routine by hand first for various reasons, then run a rake task later, and I won't the "old" build files cleaned up first. Regards, Dan