The evolution of protoplanetary disks is dominated by the conservation of angular momentum, where the accretion of material onto the central star is driven by viscous expansion of the outer disk or by disk winds extracting angular momentum without changing the disk size. Studying the time evolution of disk sizes allows us therefore to distinguish between viscous stresses or disk winds as the main mechanism of disk evolution. Observationally, estimates of the disk gaseous outer radius are based on the extent of the CO rotational emission, which, during the evolution, is also affected by the changing physical and chemical conditions in the disk. We use physical-chemical DALI models to study how the extent of the CO emission changes with time in a viscously expanding disk and investigate to what degree this observable gas outer radius is a suitable tracer of viscous spreading and whether current observations are consistent with viscous evolution. We find that the gas outer radius (R_co) measured from our models matches the expectations of a viscously spreading disk: R_co increases with time and for a given time R_co is larger for a disk with a higher viscosity alpha_visc. However, in the extreme case where the disk mass is low (less than 10^-4 Msun) and alpha_visc is high (larger than 10^-2), R_co will instead decrease with time as a result of CO photodissociation in the outer disk. For most disk ages R_co is up to 12x larger than the characteristic size R_c of the disk, and R_co/R_c is largest for the most massive disk. As a result of this difference, a simple conversion of R_co to alpha_visc will overestimate the true alpha_visc of the disk by up to an order of magnitude. We find that most observed gas outer radii in Lupus can be explained using a viscously evolving disk that starts out small (R_c = 10 AU) and has a low viscosity (alpha_visc = 10^-4 - 10^-3).