Writing better tests with the three-phase pattern
So, you’re working on a new app, and Rails just generated a test for you. You uncomment it, come up with a name, and you’re ready to write your test, right? But then what? What do you write first? What should your test code look like? If you follow a simple pattern, you’ll turn those stubbed out lines of code into clear, well-structured test cases.
Post a comment