Sha256: a9f246d2a95e6f43f574ace92c0c4dd0deb0a33070e0ca1488ecdf8018f0d36c
Contents?: true
Size: 776 Bytes
Versions: 5
Compression:
Stored size: 776 Bytes
Contents
//Tests various control variables, like context QUnit.test("Controller does receive context on explicit init", function(assert) { var done = assert.async(); //Create a test controller var TestController = function() { this.base = FlokController; this.base(); self = this; self.init = function() { assert.equal(this.context.hello, "world", "Matches"); done(); } } //Insert some HTML $("body").html(" \ <div id='root'> \ <div id='test'></div> \ </div> \ "); //Call the controllers init with a forged selector $sel = $("#test"); var c = new TestController(); c.__initialize__(0, $sel, {hello: 'world'}); c.init(); });
Version data entries
5 entries across 5 versions & 1 rubygems