]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#582] Test same object persists across _setup and start|end
authorrwldrn <waldron.rick@gmail.com>
Thu, 23 Jun 2011 18:50:57 +0000 (14:50 -0400)
committerrwldrn <waldron.rick@gmail.com>
Thu, 23 Jun 2011 18:50:57 +0000 (14:50 -0400)
test/popcorn.unit.js

index 65bf2c7509c5ac626dabfc4cc7a804dff948db28..efd738c74c830c91f76761b45a302e0dec0fc56e 100644 (file)
@@ -1120,7 +1120,7 @@ test("Manifest", function () {
 
 test("Configurable Defaults", function () {
   
-  var expects = 12,
+  var expects = 13,
       count   = 0;
 
   function plus() {
@@ -1141,11 +1141,15 @@ test("Configurable Defaults", function () {
     return {
       _setup: function( options ) {
 
+        options.persistant = true;
+
         equal( options.target, "foo", 'options.target, "foo" in configurable _setup');
         plus();
       },
       start: function( event, options ) {
 
+        ok( options.persistant, "options.persistant proves same object passed from _setup" );
+        plus();
         // target: "foo"
         // text: "bar"
         // type: "thinger"      
@@ -1715,7 +1719,7 @@ test( "Popcorn Compose", function () {
   // runs once, 2 tests
   Popcorn.plugin( "pluginOptions1", {
     _setup: function( options ) {
-       console.log( "runs once?" );
+      console.log( "runs once?" );
       ok( options.pluginoption, "plugin option one exists at setup" );
       plus();
       ok( !options.composeoption, "compose option one does not exist at setup" );