Fix test code for testing by Rails 4.1 and confirm