From: Adam Anderson Date: 2007-09-19T16:17:52+09:00 Subject: Rake TestTask running its block anytime rake is invoked -- require 'rake/testtask' Rake::TestTask.new do |t| chdir './../' puts pwd end desc "print working directory" task :pwd do puts "Working Directory #{pwd}" end -- $ rake -T cd ./../ /Users/scudco/projects rake chdir # change directory rake test # Run tests $ rake chdir cd ./../ /Users/scudco/projects Working Directory /Users/scudco/projects So the question is why does the chdir in the TestTask get executed every time no matter what? It is quite frustrating when code specific to a block is being executed for every other task. Any ideas? -- Posted via http://www.ruby-forum.com/.