oojspec example with CoffeeScript and test runner
https://github.com/rosenfeld/oojspec
by rosenfeld
HTML
<!doctype html>
<html>
<head>
<base href="http://oojspec.herokuapp.com/" />
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>oojspec Test Runner</title>
<link href="/assets/oojspec.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/assets/oojspec.js" type="text/javascript"></script>
<script type="text/javascript">oojspec.exposeAll()</script>
<!--
<script src="/assets/first_spec.js" type="text/javascript"></script>
<script src="/assets/second_spec.js" type="text/javascript"></script>
-->
</head>
<body>
<script type="text/javascript">
setTimeout(function(){ oojspec.autorun(); }, 1000);
// oojspec.autorun() - doesn't play very well with jsfiddle...
</script>
</body>
</html>
CoffeeScript
describe 'Some description', ->
@example 'async examples work', ->
a = false
setTimeout (-> a = true), 200
@waitsFor -> a
@runs -> @assert true