simplify and update rails tests