Fixed tests and rails best practices