We sit them down for a day with a fairly simple task (build a simple web or mobile app, about three screens with a basic data model) but we make sure to give them a language or framework they are unfamiliar with.
They have Google, Stack Overflow, and other employees to use as a resource. It's a great way to get to know new hires while seeing how resourceful and interested in learning they are.
Every candidate has built the app to spec with a few hours remaining, but it's really good to see those who take the initiative to spend a bit of extra time polishing it and explaining it to us, and responding to our feedback.