Skip to content

Commit

Permalink
added a test and written some code to make the test go green - yay
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgrouleff committed Dec 22, 2011
1 parent 0a48924 commit 3d2a3ec
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 19 deletions.
11 changes: 9 additions & 2 deletions dist/squash.js
Expand Up @@ -48,15 +48,22 @@
};
}
return this.require.define;
}).call(this)({"squash": function(exports, require, module) {(function() {
}).call(this)({"screen": function(exports, require, module) {(function() {

exports.Squash = (function() {
module.exports = (function() {

function _Class() {}

return _Class;

})();

}).call(this);
}, "squash": function(exports, require, module) {(function() {

module.exports = {
Screen: require('./screen')
};

}).call(this);
}});
3 changes: 3 additions & 0 deletions lib/screen.coffee
@@ -0,0 +1,3 @@
module.exports = class
constructor: ->

3 changes: 2 additions & 1 deletion lib/squash.coffee
@@ -1,2 +1,3 @@
exports.Squash = class
module.exports =
Screen: require './screen'

33 changes: 17 additions & 16 deletions package.json
@@ -1,21 +1,22 @@
{
'name': 'squash',
'description': 'A 2D rendering engine',
'keywords': ['html5', '2D', '2D rendering'],
'author': 'Rasmus Bang Grouleff <rasmus@nerdd.dk>',
'main': 'lib/squash.coffee',
'version': '0.0.1-dev',
'homepage': 'https://github.com/rbgrouleff/squash',
'bugs': 'https://github.com/rbgrouleff/squash/issues',
'repository': {
'type': 'git',
'url': 'git://github.com/rbgrouleff/Squash.git'
"name": "squash",
"description": "A 2D rendering engine",
"keywords": ["html5", "2D", "2D rendering"],
"author": "Rasmus Bang Grouleff <rasmus@nerdd.dk>",
"main": "lib/squash.coffee",
"version": "0.0.1-dev",
"homepage": "https://github.com/rbgrouleff/squash",
"bugs": "https://github.com/rbgrouleff/squash/issues",
"repository": {
"type": "git",
"url": "git://github.com/rbgrouleff/Squash.git"
},
'devDependencies': {
'stitch': '0.3.2',
'janitor': '0.1.1'
"devDependencies": {
"stitch": "0.3.2",
"janitor": "0.1.1",
"jsdom": "0.2.10"
},
'dependencies': {
'coffee-script': '1.2.0'
"dependencies": {
"coffee-script": "1.2.0"
}
}
15 changes: 15 additions & 0 deletions test/squash_test.coffee
@@ -0,0 +1,15 @@
Janitor = require 'janitor'
jsdom = require('jsdom').jsdom

Squash = require '../.'

module.exports = class extends Janitor.TestCase
setup: ->
document = jsdom "<html><body></body></html>", null,
features:
FetchExternalResources: false
@canvas = document.createElement "canvas"

'test instantiate Screen': ->
screen = new Squash.Screen @canvas
@assert screen

0 comments on commit 3d2a3ec

Please sign in to comment.