I like the expect syntax better:

    expect(mail.to).to match(/User.pluck(:email)/)