During Family Scripture Study, Misty and I are in the Bible, on Deuteronomy 30, where it talks about a recurring theme in scripture: if we are faithful, we will be prosperous; and if we are not, we will be cut off from His presence. During my Personal Scripture Study, I am on 2 Nephi 5, and it said the same thing! This is a covenant, which is an agreement with the Lord. He is telling us that He will bless us when we obey that covenant, and when we do not, we do not have that promise.
So many times, I can tell you that I have felt the Spirit leave me when I have sinned and do not obey the commandments; but then I feel His presence with me when I am obedient. So, I can tell you that I have witnessed what it says in the scriptures.