You don't have to pass the Life in the UK test to apply for ILR, but you do have to show that you have a sufficient knowledge of language and life in the UK. The usual ways of showing this is either the Life in the UK test or a ESOL qualification. There is a third way (relevant part from the ILR application below) but this doesn't apply to most applicants.
------------------
5.2 Are you the partner of
a) a permanent member of HM Diplomatic Service; or
b) a comparable UK-based staff member of the British Council on a tour of duty
abroad; or
c) a staff member of the Department for International Development who is a British
citizen or is settled in the UK? See Note 1.
Note 1
If you have answered “yes” to 5.2 a), b) or c), under the Immigration Rules you are considered to have a sufficient knowledge of the English language and life in the UK if a “person designated by the Secretary of State certifies in writing” that you have such knowledge. For the purposes of this application, you must provide such a letter from your partner’s employer (normally the head of mission at the British post abroad at which your partner is serving).