Context. Standard spectroscopic analyses of Cepheid variables are based on hydrostatic one-dimensional model atmospheres, with convection treated using various formulations of mixing-length theory. Aims. This paper aims to carry out an investigation of the validity of the quasi-static approximation in the context of pulsating stars. We check the adequacy of a two-dimensional time-dependent model of a Cepheid-like variable with focus on its spectroscopic properties. Methods. With the radiation-hydrodynamics code CO5BOLD, we construct a two-dimensional time-dependent envelope model of a Cepheid with T eff = 5600 K, log g = 2.0, solar metallicity, and a 2.8-day pulsation period. Subsequently, we perform extensive spectral syntheses of a set of artificial iron lines in local thermodynamic equilibrium. The set of lines allows us to systematically study effects of line strength, ionization stage, and excitation potential. Results. We evaluate the microturbulent velocity, line asymmetry, projection factor, and Doppler shifts. The microturbulent velocity, averaged over all lines, depends on the pulsational phase and varies between 1.5 and 2.7 km s −1 . The derived projection factor lies between 1.23 and 1.27, which agrees with observational results. The mean Doppler shift is non-zero and negative, -1 km s −1 , after averaging over several full periods and lines. This residual line-of-sight velocity (related to the "K-term") is primarily caused by horizontal inhomogeneities, and consequently we interpret it as the familiar convective blueshift ubiquitously present in non-pulsating late-type stars. Limited statistics prevent firm conclusions on the line asymmetries. Conclusions. Our two-dimensional model provides a reasonably accurate representation of the spectroscopic properties of a shortperiod Cepheid-like variable star. Some properties are primarily controlled by convective inhomogeneities rather than by the Cepheiddefining pulsations. Extended multi-dimensional modelling offers new insight into the nature of pulsating stars.