Soundflower works great.
You need to install the very latest version, which is 2.0b2.
Once installed you will see additional sound input and output options. Use Soundflower (2ch).
To be more precise:
You could set both input and output to Soundflower (2ch) and it would work, but you would not be able to hear anything while recording (the sound would be “piped” directly from output to input).
To be able to hear AND record, there is just a small little thing you need to do: open Audio MIDI Setup; create a new “Multi-Output Device”, and add your internal speakers (or headphones) as well as Soundflower (2ch) to it.
Now set this new Multi-Output device as output and Soundflower (2ch) as input and you’re good to go.
Note: you can’t adjust volume when the Multi-Output Device is selected so adjust it comfortably with your normal output before switching.