spec/javascripts/jax/model_spec.js in jax-0.0.0.5 vs spec/javascripts/jax/model_spec.js in jax-0.0.0.6

- old
+ new

@@ -21,9 +21,19 @@ model.one.value = 2; model = klass.find("name"); expect(model.one.value).not.toEqual(2); }); }); + + describe("added to world without a mesh", function() { + var context; + beforeEach(function() { model = new (Jax.Model.create({after_initialize:function(){}}))({position:[0,0,0]}); context = new Jax.Context('canvas-element'); context.world.addObject(model); }); + afterEach(function() { context.dispose(); }); + + it("should not cause errors when rendering", function() { + expect(function() { context.world.render(); }).not.toThrow(); + }); + }); describe("without any custom methods", function() { beforeEach(function() { model = Jax.Model.create({ initialize: function($super, data) { $super(Jax.Util.normalizeOptions(data, {mesh:new Jax.Mesh.Quad()})); }