]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
fixed comments and variables in unit test
authorunknown <Venom@.(none)>
Fri, 25 Feb 2011 19:21:45 +0000 (14:21 -0500)
committerunknown <Venom@.(none)>
Fri, 25 Feb 2011 19:21:45 +0000 (14:21 -0500)
popcorn.js
test/popcorn.unit.js

index e6344ae8e61df8d3e719144618655548b2cbbd91..ff6dd32b3dae2fb1cb18b7249651f02c9b607df0 100644 (file)
@@ -40,7 +40,7 @@
     
   };
 
-  //addes a Popcorn instance to the Popcorn instance array
+  //  Addes a Popcorn instance to the Popcorn instance array
   Popcorn.addInstance = function( popcornInstance ) {
   
     if ( !popcornInstance.video.id ) { 
@@ -55,7 +55,7 @@
     
   };
 
-  //User passes in the name of the Popcorn instance and receive a popcorn object
+  //  User passes in the name of the Popcorn instance and receive a popcorn object
   Popcorn.getInstanceById = function( name ) {
   
     return Popcorn.instances[ Popcorn.instanceIds[ name ] ];
index c016b4a3f3ca3e4ba82a941a49ec2ba4426a64db..66e1ce411e359a45306904b33291ee0201be8d74 100644 (file)
@@ -69,11 +69,10 @@ test("Utility", function () {
 });
 
 test("Instances", function() {
-  var popped =  Popcorn("#video");
-  var popped2 = Popcorn("#video");
-  var popped3 = Popcorn("#video");
-  var expects = 9, 
-      count   = 0;
+  var popped =  Popcorn("#video"),
+      expects = 9, 
+      count   = 0,
+      instance;
   
   expect(expects);
   
@@ -100,7 +99,6 @@ test("Instances", function() {
   ok( "length" in Popcorn.instances && "join" in Popcorn.instances, "Popcorn.instances is a provided cache array");  
   plus();
   
-  var instance;
   instance = Popcorn.getInstanceById("video");
   
   ok( instance.video, "Stored instance as a `video` property" );
@@ -112,7 +110,7 @@ test("Instances", function() {
   ok( instance instanceof Popcorn, "Instance instanceof Popcorn" );
   plus();
    
-  ok( 3 === Popcorn.instances.length, "There are the correct number of Popcorn instances" );
+  equal( Popcorn.instances.length, 1, "There are the correct number of Popcorn instances" );
   plus();
    
 });