Permalink
Browse files

CoffeeScript starting point

  • Loading branch information...
1 parent b69a013 commit c119fd4969ae59ad25d66ff547c19dd9efa81283 @docwhat docwhat committed Nov 10, 2011
@@ -0,0 +1,9 @@
+## Simple CoffeScript Setup using QUnit
+
+To run testsuites just open coderetreat.html in a capable browser.
+
+You have access to `CoffeeScript.compile(string_of_coffeescript)` to try things out via [firebug](http://getfirebug.com/) or the built-in webkit console.
+
+# See Also:
+ * [CoffeeScript](http://jashkenas.github.com/coffee-script)
+ * [QUnit](http://docs.jquery.com/QUnit)
@@ -0,0 +1,7 @@
+# Note: All code run below is running in a closure.
+#
+# This means that to make a variable global, you must assign it to `window`.
+#
+# See http://jashkenas.github.com/coffee-script/#scripts for more info
+window.foo = ->
+ return "qix";
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>coderetreat Test Suite</title>
+ <script src="http://code.jquery.com/jquery-latest.js"></script>
+ <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen"/>
+ <script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>
+ <script type="text/javascript" src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script>
+ <!-- Your project file goes here -->
+ <script type="text/coffeescript" src="coderetreat.coffee"></script>
+ <!-- Your tests file goes here -->
+ <script type="text/coffeescript" src="coderetreatTest.coffee"></script>
+</head>
+<body>
+ <h1 id="qunit-header">coderetreat</h1>
+ <h2 id="qunit-banner"></h2>
+ <div id="qunit-testrunner-toolbar"></div>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+ <div id="qunit-fixture">test markup, will be hidden</div>
+</body>
+</html>
@@ -0,0 +1,2 @@
+test 'is foo "bar" ?', ->
+ equals foo(), "bar"

0 comments on commit c119fd4

Please sign in to comment.