In Joshua 2:9 she uses the sacred name for “LORD” - (JEHOVAH) - and therefore identifies herself, not as an idolater, but one who believes in the Lord of the Hebrews (or has at least come to believe in Him since the spies have appeared at her house).
Her harbouring of the spies stemmed not from fear, but from faith that Israel’s God was the true God.
Hebrews 11:31 commends her faith - not her immorality.
Her testimony in Joshua 2:10 makes it clear that the inhabitants of Canaan were well acquainted with what the God of the Israelites had done. What is particularly interesting in her testimony is that she speaks of the Red Sea having been dried up.
This event had taken place some 40 years earlier - and yet Rahab knew of it!
Discover other facts regarding the Book of Joshua in this audio. Check the accompanying PDF Notes.