So i tried the above :javascript which works :) However HAML wraps the generated code in CDATA like so:
<script type="text/javascript">
//<![CDATA[
$(document).ready( function() {
$('body').addClass( 'test' );
} );
//]]>
</script>
The following HAML will generate the typical tag for including (for example) typekit or google analytics code.
%script{:type=>"text/javascript"}
//your code goes here - dont forget the indent!