Added rails tests