In the same way, was not even Rahab the prostitute considered righteous for what she did when she gave lodging to the spies and sent them off in a different direction?
Here is another Old Testament example. Here is Rahab, whose life was not at all about God, yet here is God knocking at her door. When the spies came, she chose to align herself with God's side. This was an act of faith, seeing that from a world's point of view, the Israelites didn't have a chance against the walls of Jericho. But we know the rest of the story, and Rahab's faith is remembered.