Use 'who ever' as two words when it is being used for emphasis, usually in rhetorical statements expressing surprise or puzzlement.
"Who ever thought this one up?"
In that statement, 'ever' is being used as an intensifier:
"Who thought this one up?" - "Who ever thought this one up?"
"Whoever wants it - lunch is ready."
Think of the difference between how you would use 'however', and as in the sentence, "How ever do you do that?" - "How do you do that?"
How does one know whether to write who ever or whoever.
The intensifiers whoever, whichever, however, etc. are normally spelt as a single word (or sometimes as a separate word). However, the most important thing about them as intensifiers is that they can occur at the beginning of a sentence only.