Joshua 2 1-16: There are times when the Bible condones lying, such as in the case of Rahab given here.
Joshua 6 1-11: Imagine the psychological effect this must have had on the people of Jerecho? "OK, they're walking around the city. Are they going to storm it now?" Then on the seventh day, "Oh my gosh, are they going to storm it this time? No. Are they going to storm it this time?"