Become a member
to unlock all features

Level Up!

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


    Test ActiveRecord Named Scopes

    railsRuby on Rails

    Learn how to test ActiveRecord named scopes using RSpec.

    In this lesson, we will test a User model that will have a by_ci_email method that we will define on the model. We will test this method in our user_spec.rb file and pass in a lower case email argument to demonstrate that the by_ci_email method is functioning correctly by finding the correct user.



    Become a Member to view code

    You must be a Pro Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    orLog In