Spectral approximations of the Stokes problem by divergence-free functions