Was the cap off when you depressed the calper piston? Hopefully it was, other wise you may have damaged something if you overpressured the system, i.e. tried to force the brake fluid out with nowhere for it to really go.
Most probably though, you have just got air in the brake lines and need to bleed you brakes for the mushiness to go away.