We propose a teaching apparatus to simultaneously measure the refractive index and thickness of a thin film. The apparatus includes: a diode laser, a polarizer, a spectrometer, a photodiode and a portable digital multimeter. With the apparatus, we measure the refractive index and thickness of two thin films (a silicon dioxide film on silicon, a silicon nitride film on silicon). The maximum discrepancy between our apparatus and an ellipsometer is 1.4%. We also analyze the errors of our apparatus by numerical simulations. The lab with the apparatus described here has several valuable pedagogical outcomes: 1) understanding the multi-beam interference in a film; 2) applying chi-square minimization; 3) carrying out the nonlinear curve fitting with multiple parameters. The lab can be used in an optical polarization teaching for undergraduate sophomores.