Ported to jasmine 2.0.