וזכרת את כל הדרך אשר הוליכך ה' אלקיך זה ארבעים שנה במדבר למען ענותך לנסותך לדעת את אשר בלבבך התשמור מצותיו אם לא, ויענך ויערבך ויאכלך את המן וגו'.
"And you shall remember the entire way that Hashem your G-d led you for forty years in the desert, in order to afflict you and test you to know what is in your heart, if you will keep His mitzvos or not; and He afflicted you and made you hungry and gave you manna to eat."(Devarim 8:2-3)
What does it mean when Hashem says that He tested the Jewish people in order to know what is in their hearts? When a person has an employee and he isn't sure about his true intentions, he may test him in order to see if he can be trusted. But Hashem knows everything; He is aware of our innermost thoughts and feelings. He doesn't need to test us to know if we want to keep His mitzvos or not.
Furthermore, what does it mean that Hashem afflicted us and made us hungry and gave us manna? The manna stilled the hunger of the Jewish people; it didn't make them hungry.
This verse teaches us something very important. Sometimes a person may wonder if he is really serving Hashem when he is performing mitzvos, as opposed to doing these mitzvos for personal gain or due to other ulterior motives. He may be wondering, "Who knows if I really mean to serve Hashem with all my heart?" The Chovos Halvovos teaches that a person who serves Hashem while having in mind personal gain, honor or reward, is as if he is serving a foreign deity together with Hashem. This is a very frightening thing. How indeed can a person be certain about the purity of his intentions when performing mitzvos?
Our sages tell us that when the manna fell, it revealed the personal spiritual level of every Jew. How so? The tzaddikim received their portion of manna at their doorstep. Those who were on a lesser spiritual level had to go out of their tents to collect the manna. The less righteous a person was, the farther he had to go to collect his manna.
The verse can be interpreted to mean that when a person wanted to test himself about his service of Hashem, he just had to look at the manna. "Remember, the entire way" when you wish to go after Hashem. "When you want to test yourself to know what is in your heart, if you keep the mitzvos properly or not." The word anoshcha - afflict you, can also mean "to answer you." The answer to your question, and the way to become even more "hungry" for Hashem's closeness, was through the manna, because when a person saw that the manna fell somewhat farther from his tent, he understood that he must work on improving himself. Through the manna, every person was able to do a spiritual self-check each morning and adjust his deeds accordingly.
The tzaddik Rebbe Shimon of Yeroslov, who was a disciple of the holy Chozeh of Lublin, used to say: "What is the difference between me and the other Chassidim of our Rebbe the Chozeh? As we were traveling to our Rebbe, my friends would pray to Hashem that He should remove all of their sins and cleanse all of their thoughts, because they were afraid to face our Rebbe, who was able to see all of a person's deeds and thoughts. But I," continued Rebbe Shimon, "would pray to Hashem that He should enable the Rebbe to see all of my misdeeds and improper thoughts, so that the Rebbe should be able to pinpoint my shortcomings and censor me as needed. Just as when a person visiting his doctor will not try to cover up his symptoms and pretend that everything is fine, because then he will not be cured of his illness; so too, a person visiting his Rebbe wants the Rebbe to be able to see all of his shortcomings so that he should be cured of his sins."
This is what took place every morning in the desert when the manna fell. A person who felt good about himself thinking that he is serving Hashem, may not have been aware that one his actions were improper or performed without proper intentions. But the next morning, when he wanted to gather the manna, he saw that it fell somewhat further than the day before. His neighbors would ask him why this happened, and he would search his heart in order to find his fault and correct it. A different person who was on a lower spiritual level decided one day to become better. The next morning when he woke up he found the manna right in front of his tent. Suddenly his neighbors gained a new respect for him and this helped him continue growing every day. This is how the manna made the Jewish people hungry for Hashem, and enabled them to test themselves about the level of their Divine service.
והיה עקב תשמעון
"And it will be that you will listen." (Devarim 7:12)
The word עקב is used in an interesting way in this verse. It should have said, אם תשמעון - if you will listen.
As we've discussed before, the manna showed each person where he is up to in his quest of serving Hashem. Today, we no longer have the manna, so how can we know how we are doing spiritually? How can we test ourselves to know if we are growing closer to Hashem?
The word תשמעון - listen, can also mean to "gather" (as used in the verse "and Saul gathered" - Shmuel I 15:4). So now we can interpret the verse to mean: והיה עקב - and it will be in the days ofikvesa d'meshicha, before the coming of Moshiach, תשמעון - if you will then gather yourselves in unity then you will be able to know together how you are doing spiritually. The only way we can be sure that we are going in the right direction is by being united as one person, in brotherhood and friendship.