There is one detail in Joshua 2, in the story about Rahab and the spies, that adds great excitement to an already exciting story. The tiny detail is this:
And she said, According unto your words, so be it. And she sent them away, and THEY DEPARTED: AND SHE BOUND THE SCARLET LINE IN THE WINDOW. (Joshua 2:21 -- Caps mine)
She had to wait approximately two weeks for the promised rescue to come to pass. Yet, she didn't give mental assent to the words of the spies, and planned to put the cord out of the window only when she saw the army approaching. Instead, she did it immediately. As soon as she helped the spies escape, she put the line in the window as a sign of her faith in their words.
With the type of fear that must have been rampant in Jericho at that time, she could have been in big trouble. The soldiers had already been to her house looking for the spies. They were watching the city both from within and from without, since the spies had to hide out in the hills for three days to avoid the searchers.
Scarlet, as we know, isn't a subdued color. Yet, Rahab had the courage and faith to put the cord out and leave it against the stone wall throughout the whole campaign against Jericho by Joshua and his forces.
She also had to tell her family about the impending attack and the cord, and persuade them to come to her place when the attack started -- trusting that none of them would let the secret slip or turn against her.
The hand of the Lord was over her, I'm sure. That would account for a great deal of the protection she received. However, the fact that she stepped out in faith, recognized God and His men for who they were, and prepared herself and her family from the very beginning, shows what type of person she was on the inside. No matter what kind of life she had been living, her integrity, courage and strength of character surfaced when they were needed.
OH, for the type of faith that Rahab had... to take God at His word and trust that what He has promised to do He is able to perform. Rom. 4:21