RubyFlow The Ruby and Rails community linklog

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

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in