class Rake::Task

def clear

tasks that have been assigned. (Normally used in the unit tests.)
Clear the task list. This cause rake to immediately forget all the
def clear
  Rake.application.clear
end