module Rails::Generators::Testing::Behaviour::ClassMethods

def destination(path)

destination File.expand_path("../tmp", __dir__)

Sets the destination of generator files:
def destination(path)
  self.destination_root = path
end