On Saturday 22 December 2007, Nicolás Sanguinetti wrote:
> Apparently rake's PackageTask didn't go recursively down directories
> :-\ I've updated the packages with the code.

I've attached a small patch for 0.2.2. The point is that I'd like to be 
able use js-spec on code that itself does not depend on any particular 
lib such as Prototype.

For an example see

  http://schuerig.de/michael/blog/index.php/2007/12/22/javascript-fsm/

Michael

-- 
Michael Schuerig
mailto:[EMAIL PROTECTED]
http://www.schuerig.de/michael/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

--- jsspec-0.2.2.js	2007-12-22 16:45:47.000000000 +0100
+++ jsspec.js	2007-12-22 18:11:50.000000000 +0100
@@ -379,7 +379,11 @@
 		this.specs.each(Element.insert.curry(list));
 		list.select("li").each(function(spec, index) { this.specs[index].id = spec.identify() }, this);
 		return element;
-	}
+	},
+  expect: function(object) {
+    Expectation.extend(object);
+    return object;
+  }
 });
 
 Context.Spec = Class.create({
@@ -491,8 +495,11 @@
 
 	var extend = function() {
 		$A(arguments).each(function(object) {
-			object.prototype.should = should;
-			object.prototype.shouldNot = object.prototype.should_not = shouldNot;
+      if (object.prototype) {
+        object = object.prototype;
+      }
+      object.should = should;
+      object.shouldNot = object.should_not = shouldNot;
 		});
 	};
 

Reply via email to