  Rastall's theory is a modification of General Relativity, based on the
non-conservation of the stress-energy tensor. The latter is encoded in a
parameter $\gamma$ such that $\gamma = 1$ restores the usual $\nabla_\nu
T^{\mu\nu} = 0$ law. We test Rastall's theory in cosmology, on a flat
Robertson-Walker metric, investigating a two-fluid model and using the type Ia
supernovae Constitution dataset. One of the fluids is pressureless and obeys
the usual conservation law, whereas the other is described by an equation of
state $p_x = w_x\rho_x$, with $w_x$ constant. The Bayesian analysis of the
Constitution set does not strictly constrain the parameter $\gamma$ and prefers
values of $w_x$ close to -1. We then address the evolution of small
perturbations and show that they are dramatically unstable if $w_x \neq -1$ and
$\gamma \neq 1$, i.e. General Relativity is the favored configuration. The only
alternative is $w_x = -1$, for which the dynamics becomes independent from
$\gamma$.
