Skip to content

Instantly share code, notes, and snippets.

@Stephen-Zhang
Created June 20, 2011 16:32
Show Gist options
  • Save Stephen-Zhang/1035948 to your computer and use it in GitHub Desktop.
Save Stephen-Zhang/1035948 to your computer and use it in GitHub Desktop.
Test Case for Spine.js default array attributes
describe("Model with default Array attributes", function() {
var Asset;
beforeEach(function(){
Asset = Spine.Model.setup("Asset", ["name", "arrayTest"]);
Asset.include({
arrayTest: []
});
});
it("Default arrays are new for each object", function() {
var asset1 = Asset.create();
var asset2 = Asset.create();
expect(asset1.arrayTest).not.toBe(asset2.arrayTest);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment