Sha256: f504a7f2166937211a2acd1dc2d9693d03530d99f509371d4da04e33963f8228

Contents?: true

Size: 1.23 KB

Versions: 27

Compression:

Stored size: 1.23 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.requiredObjectForPropertyPath Tests
// ========================================================================
/*globals module test ok same equals expects */

module("SC.requiredObjectForPropertyPath") ;

test("should be able to resolve an object on the window", function() {
  var myLocal = (window.myGlobal = { test: 'this '}) ;

  same(myLocal, { test: 'this '}) ;
  same(window.myGlobal, { test: 'this '}) ;

  // verify we can resolve our binding path
  same(SC.requiredObjectForPropertyPath('myGlobal'), { test: 'this '}) ;

  window.myGlobal = null;
});

test("should throw error when object can't be found", function() {
  should_throw(function(){ SC.requiredObjectForPropertyPath('notExistingObject'); },
                  Error, "notExistingObject could not be found");
});

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
sproutcore-1.11.0 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.11.0.rc3 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.11.0.rc2 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.11.0.rc1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.10.3.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.10.2 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.10.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.10.0 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.10.0.rc.3 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.10.0.rc.2 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.10.0.rc.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.9.2 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.9.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.9.0 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.8.2.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.8.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.8.0 lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js