1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Test ActiveRecord Validations

    railsRuby on Rails

    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.