some test code of ruby on rails