1) I spent 6 hours on it. I didn't do some of the "optional" parts (unit tests specifically) because I felt like 6 hours was enough to "show I can program" i.e. what it was supposed to do worked. Result: I got grilled over why the optional parts weren't there and didn't get an offer.
2) I spent 15 hours on it. I did everything I could think of on it including 50ish unit tests and more than what was asked for. Result: I got and accepted the job. (note: I had laid out my salary requirements before hand).
Is this "great"? I have an active github/open source profile. To me in both cases they basically wanted to waste my time and mental effort, and see if I would do it. That.. can't be ideal.