How to hide preview of text contents from Messages.app notifications in Mountain lion?
There is an option to "show preview" that can be ticked off in the settings of the Messages app: Go to Settings> Notification> Messaging. 

Stated another way:

1) Go to Settings = Click on the GEAR icon (System Preferences)

2) The top-most section of System Preferences on My Mac is labeled "Personal" at the far right is "Notifications" (a black square with a red dot in the center)

3) Click that square and the dialogue window will show a list on the left which should include "Messages" with a sub title "Badges and Sounds"

4) Click that item in the list on the left and you will notice on the right side, toward the top it has three options (the default is Banners).  Click the item to the left of Banners (should be None).

Now you can press CMD+Q on your keyboard to close System Prefs and the alerts will stop popping up in the upper right of your screen (you may want to test it)

This was an issue for me because I was allowing one of my staff to use my Macbook for some training and all my personal iMessages kept popping up in front of her -  NOT COOL.  This ended that problem