In order to evaluate the efficiency of the monetary transmission mechanism, we develop the formulas for testing rational expectations theory in the term structure of interest rates with VAR models of stochastically switching regimes in which all the parameters are regime-dependent. These formulas are obtained for the strict version of rational expectations as well as for the case where measurement errors are assumed in the expectations relationship. They are extensible to other contexts that involve variables linked by rational-expectations behaviors. The testing procedure is implemented on interest rates of the Spanish inter-bank money market. Measurement errors must be assumed to find signs favourable to the theory.