J. Carl Laney has a good discussion of the ethics of Rahab's lie (Josh 2:5). Laney notes that,
"Several key hermeneutical principles are helpful in responding to this question. First, it is important to remember that the Bible often records what God does not necessarily approve. Second, divine approval of an individual in one aspect or area of life does not mean there is divine approval in all aspects of character or conduct. Third, application should be made on the basis of what the Bible obviously blesses or commends, not every detail of the passage."
Read the rest of Laney's post here.