Test ActiveRecord Validations

Victor Hazbun
InstructorVictor Hazbun

Share this video with your friends

Send Tweet

Learn how to test ActiveRecord validations using RSpec.

In this lesson we'll write a test that expects the name attribute to be present on the User model instance. We'll see that at first this test fails because we need to add this validation on the model.