Sha256: ec962c17419ebb78cb7c14e096b8fa7a6ec31f671f005265998a1795c9b1dd05
Contents?: true
Size: 732 Bytes
Versions: 80
Compression:
Stored size: 732 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
80 entries across 80 versions & 1 rubygems