לֹ֣א תִשְׁמַ֗ע אֶל־דִּבְרֵי֙ הַנָּבִ֣יא הַה֔וּא א֛וֹ אֶל־חוֹלֵ֥ם הַחֲל֖וֹם הַה֑וּא כִּ֣י מְנַסֶּ֞ה יְהוָ֤ה אֱלֹֽהֵיכֶם֙ אֶתְכֶ֔ם לָדַ֗עַת הֲיִשְׁכֶ֤ם אֹֽהֲבִים֙ אֶת־יְהוָ֣ה אֱלֹהֵיכֶ֔ם בְּכָל־לְבַבְכֶ֖ם וּבְכָל־נַפְשְׁכֶֽם׃
não darás ouvidos às palavras daquele profeta ou àquele que teve o sonho; pois o Eterno, vosso Deus, vos está testando, para saber se amais ao Eterno, vosso Deus, com todo o vosso coração e com toda a vossa alma.
Mishneh Torah, Foreign Worship and Customs of the Nations
It is forbidden to enter into a disputation with one who prophesies in the name of idolatry, and he is not asked to bring a token or perform a miracle. If he does so of his own account, no attention should be paid to him and no afterthought given to it; and whosoever meditates about his tokens, lest they be true, violates a prohibitive commandment, saying: "Thou shalt not hearken unto the words of that prophet" (Deut. 13.4). So is the punishment of the false prophet by strangulation, though he be prophesying in the name of God and neither added to or diminished from the Torah, even as it is said: "But the prophet, that shall speak a word presumptuously in My name… that same prophet shall die" (Deut. 18.20)7Ibid. C. The Hebrew text quotes this Verse incorrect. See text in the Torah. G.
Mishneh Torah, Foundations of the Torah
Therefore, if a prophet arose and performed great tokens and miracles, and thereby seeks to deny the prophecy of Moses our Master, we must not hearken unto him, for we know clearly that those tokens are of enchantment and witchcraft, because the prophecy of Moses our Master is not based upon the tokens so as to make a comparison between the tokens of this one and the tokens of that one; for with our own eyes we saw it, and with our own ears we heard it even as he himself heard. This is rather to be compared to witnesses who testify before a man concerning a matter which he saw with his own eyes that it is not as he saw it, who does not hearken to them, but certainly knows that they are false witnesses. Therefore it is said in the Torah, if even the sign or the wonder come to pass: "Thou shalt not hearken unto the words of that prophet" (Ibid. 13.3). Behold, this one comes to thee with token and wonder to deny that which thou didst see with thine own eyes; whereas we do not believe in a miracle save because of the commandments which Moses commanded us, how will we accept this token which is brought to deny the prophecy of Moses which we saw and heard?
Mishneh Torah, Foundations of the Torah
All these matters were said only concerning the rest of the commandments, but concerning idolatry he must not be listened to, even it be temporary, and even if he delivered great tokens and performed great miracles and said that God commanded him that idolatry should be worshipped this day only, or this hour only; for, lo, this one spoke perversion against God, and concerning such one Holy Writ commanded, saying: "And the sign and the wonder come to pass…Thou shalt not hearken unto the words of that prophet…Because he hath spoken perversion against the Lord your God" (Ibid. 13. 2.4.6); and, lo, he came to refute the prophecy of Moses, we therefore know of a certainty that he is a false prophet, and all that which he did was done by enchantment and witchcraft, and he shall be strangled.