Sha256: 1cc025f473a4241bb2f9a26c5ee21b7f44e285827c754571709c371b03412c09
Contents?: true
Size: 648 Bytes
Versions: 2
Compression:
Stored size: 648 Bytes
Contents
module('item', lazy('item')); test('has components', function(){ ok(e.has('tsprite update items.png')) }); test('update method', function(){ //touching default to false ok(!e.touching) expectListener(e, 'update'); }); test('hitting hero should call touch', function(){ expectCall(e, 'touch'); //fake hitBody and always return true stub(e.hero, 'hitBody', function(){ return true; }); e.item_update(); //should call untouch afterwards //force hitbody to always return false now... stub(e.hero, 'hitBody', function(){ return false; }); expectCall(e, 'untouch'); e.item_update(); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
entityjs-0.3.1 | templates/platform/tests/items/item_test.js |
entityjs-0.3.0 | templates/platform/tests/items/item_test.js |