The young men the spies went in, and brought out Rahab, and her father, and her mother, and her brothers, and all that she had; all her relatives also they brought out; and they set them outside of the camp of Israel.
Now how did Joshua know that? It didn't happen for several hundred years, but you will read in first Kings, the sixteenth chapter, and the thirty-fourth verse where the king decided to rebuild the city of Jericho, and they started building it in the time of his firstborn son. Then when his youngest son was born, they set the gate of the city of Jericho. The prophecy here of Joshua was literally fulfilled. The man was cursed also, so the whole prophecy was fulfilled. "