Sha256: 736981e664210fdf9d9e9c42782c01c982549924dc81883f73d153ea4c231652

Contents?: true

Size: 812 Bytes

Versions: 40

Compression:

Stored size: 812 Bytes

Contents

// ========================================================================
// 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

40 entries across 40 versions & 2 rubygems

Version Path
spade-0.0.1 sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.5.0.pre.5 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.5.0.pre.4.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.5.0.pre.4 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.5.0.pre.3 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.5 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.5-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.4-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.4 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.3.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.3-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.3 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.2-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.2 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.1-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.0-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.0 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.0.rc.5 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js
sproutcore-1.4.0.rc.4 lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js