[Ruby] [Test code learning/output]

1 minute read

▼This curriculum describes the test code of the application created in the curriculum of the previous chapter.

・Last time I created a simple Twitter, so I learned the test code. It seems that the engineer’s work often leaves them at the start, so I put a lot of effort into it.

・Describe it example example expect(X).to eq Y ・Organize instances with FactoryBot Besides, the generation method by before and Faker. Organize the context.

◆ Create test code for single and combined. ・First, create a model and controller by itself.

  • After that, create the integration test code using the instance, character string, and gem learned above. ・Create a combined test code for users, tweets, and comments.
  • Finally, the support module simplifies login.

▼Summary ・I felt that the amount and volume were small when I made it into letters, but the task of actually creating a file from scratch and writing the test code was extremely difficult for me as a beginner. .. .. .. However, when I saw the movement that started after entering the code each time at the terminal, my growth and interest in programming increased. I want to go to the next curriculum early and learn more. Next year, I’ll have fun learning to make the career of an engineer successful.

Tags: ,

Updated: