Sha256: f48837da9db20048f6c5ad2f34eabe4a1dfd3380d67513e0c9d1878fb17ef494
Contents?: true
Size: 1.17 KB
Versions: 41
Compression:
Stored size: 1.17 KB
Contents
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2011 Strobe Inc. and contributors. // ©2008-2011 Apple Inc. All rights reserved. // License: Licensed under MIT license (see license.js) // ========================================================================== // ======================================================================== // SC.guidFor Tests // ======================================================================== /*globals module test ok isObj equals expects */ var objectA, objectB , arrayA, stringA; // global variables module("Beget function Module", { setup: function() { objectA = {} ; objectB = {} ; arrayA = [1,3]; stringA ="stringA"; } }); test("should return a new object with same prototype as that of passed object", function() { equals(YES, SC.beget(objectA) !== objectA, "Beget for an object") ; equals(YES, SC.beget(stringA) !== stringA, "Beget for a string") ; equals(YES, SC.beget(SC.hashFor(objectB))!==SC.hashFor(objectB), "Beget for a hash") ; equals(YES, SC.beget(arrayA) !== arrayA, "Beget for an array") ; });
Version data entries
41 entries across 41 versions & 1 rubygems