This test doesn't do anything. We're testing that a where is called, which we stub the result so orders.each does nothing. If we wanted to test that the where is being called we should move it to the it block. We should at least test this with one real uncredited order completed before the date, and one real uncredited order completed after the date. What we would be testing is if the uncredited order actually receives award_loyalty_points or not.