Implementing a Basic Confidence-Checking System

Learn to implement a basic confidence-checking system in our application on how to avoid duplicative tests for our Rails application.

We could just throw #CONFIDENCE CHECK before these assertions, but we don’t think this sort of code comment is nearly as useful as actual code. Let’s make a method that will indicate which assertions are checking that we can run our test and which assertions are the actual test.

We’ll do that by assuming the existence of a method called confidence_check that takes a block and executes the code inside that block.

Get hands-on with 1200+ tech skills courses.