You said it's an ATB frame so I assume it has posts for cantilever or V-brakes. For cantlevers you will need a housing stop above the straddle wire, probably as part of the seat post clamp and you run the housing in one piece all the way to this stop. For V-brakes, you run the housing continuously all the way to the noodle.