<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>src/jj.base.js</filename>
    </added>
    <added>
      <filename>test/mock_spec.js</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), *%w[lib helpers])
 
 desc &quot;Build the jj.js file&quot;
 task :dist do
-  content = %w(jj jj.method_proxy jj.stub jj.mock).inject('') do |js, name|
+  content = %w(jj.base jj.method_proxy jj.stub jj.mock).inject('') do |js, name|
     js &lt;&lt; read_js(name)
   end
   </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,7 @@ def read_template
 end
 
 def write_dist(content)
+  FileUtils.rm_rf(File.dirname(JJ_DIST))
   FileUtils.mkdir_p(File.dirname(JJ_DIST))
   File.open(JJ_DIST, 'w') do |f|
     f &lt;&lt; content</diff>
      <filename>lib/helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 JJ.MockProxy = function(target) {
   JJ.mockCache[target] = this;
   this.target = target;
-  this.methods = { };
+  this.expectations = { };
   this.storePristine();
 }
 
@@ -20,6 +20,7 @@ JJ.extend(JJ.MockProxy.prototype, {
   
   method: function(name, fn) {
     this[name] = new JJ.MethodProxy(this, name, (fn || this.target[name]));
+    this.expect(this[name]);
     if (!fn) { this.fakeProperties.push(name); }
     return this[name];
   },
@@ -35,6 +36,6 @@ JJ.extend(JJ.MockProxy.prototype, {
   },
   
   expect: function(method) {
-    this.methods[method] = this.methods[method] || new JJ.MethodExpectation(method);
+    this.expectations[method] = this.expectations[method] || new JJ.MethodExpectation(method);
   }
 });</diff>
      <filename>src/jj.mock.js</filename>
    </modified>
    <modified>
      <diff>@@ -2,8 +2,9 @@
   $(Screw).bind('loaded', function() {
     $('.status').fn({
       display: function() {
-        $(this).text(
-          $('.passed').length + $('.failed').length + ' test(s), ' + $('.failed').length + ' failure(s)'
+        $(this).html(
+          $('.passed').length + $('.failed').length + ' test(s), ' + $('.failed').length + ' failure(s)&lt;br /&gt;' +
+          ((new Date() - Screw.suite_start_time)/1000.0).toString() + &quot; seconds elapsed&quot;
         );
       }
     });</diff>
      <filename>test/screw-unit/screw.behaviors.js</filename>
    </modified>
    <modified>
      <diff>@@ -26,16 +26,17 @@
         .bind('failed', function(e, reason) {
           $(this)
             .addClass('failed')
-            .append($('&lt;p class=&quot;error&quot;&gt;').text(reason.toString()))
+            .append($('&lt;p class=&quot;error&quot;&gt;&lt;/p&gt;').text(reason.toString()));
 
           var file = reason.fileName || reason.sourceURL;
           var line = reason.lineNumber || reason.line;          
           if (file || line) {
-            $(this).append($('&lt;p class=&quot;error&quot;&gt;').text('line ' + line + ', ' + file));
+            $(this).append($('&lt;p class=&quot;error&quot;&gt;&lt;/p&gt;').text('line ' + line + ', ' + file));
           }
         })
     })
     .bind('before', function() {
+      Screw.suite_start_time = new Date();
       $('.status').text('Running...');
     })
     .bind('after', function() {</diff>
      <filename>test/screw-unit/screw.events.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,60 +1,84 @@
 Screw.Matchers = (function($) {
   return matchers = {
     expect: function(actual) {
-      var funcname = function(f) {
-          var s = f.toString().match(/function (\w*)/)[1];
-          if ((s == null) || (s.length == 0)) return &quot;anonymous&quot;;
-          return s;
-      };
-
-      var stacktrace = function() {
-          var s = &quot;&quot;;
-          for(var a = arguments.caller; a != null; a = a.caller) {
-              s += funcname(a.callee) + &quot;\n&quot;;
-              if (a.caller == a) break;
-          }
-          return s;
-      };
-
       return {
         to: function(matcher, expected, not) {
           var matched = matcher.match(expected, actual);
           if (not ? matched : !matched) {
-            console.debug(0);
-            console.debug(stacktrace());
-            console.debug(1);
             throw(matcher.failure_message(expected, actual, not));
           }
         },
-        
+
         to_not: function(matcher, expected) {
           this.to(matcher, expected, true);
         }
       }
     },
-    
+
     equal: {
       match: function(expected, actual) {
+        if(expected == actual) return true;
+        if(actual == undefined) return false;
+
         if (expected instanceof Array) {
           for (var i = 0; i &lt; actual.length; i++)
             if (!Screw.Matchers.equal.match(expected[i], actual[i])) return false;
           return actual.length == expected.length;
         } else if (expected instanceof Object) {
           for (var key in expected)
-            if (expected[key] != actual[key]) return false;
+            if (!this.match(expected[key], actual[key])) return false;
           for (var key in actual)
-            if (actual[key] != expected[key]) return false;
+            if (!this.match(actual[key], expected[key])) return false;
           return true;
-        } else {
-          return expected == actual;
         }
+        return false;
       },
-      
+
       failure_message: function(expected, actual, not) {
         return 'expected ' + $.print(actual) + (not ? ' to not equal ' : ' to equal ') + $.print(expected);
       }
     },
     
+    be_gt: {
+      match: function(expected, actual) {
+        return actual &gt; expected;
+      },
+      
+      failure_message: function(expected, actual, not) {
+        return 'expected ' + $.print(actual) + (not ? ' to not ' : ' to ') + 'be greater than ' + $.print(expected);
+      }
+    },
+
+    be_gte: {
+      match: function(expected, actual) {
+        return actual &gt;= expected;
+      },
+      
+      failure_message: function(expected, actual, not) {
+        return 'expected ' + $.print(actual) + (not ? ' to not ' : ' to ') + 'be greater than or equal to ' + $.print(expected);
+      }
+    },
+
+    be_lt: {
+      match: function(expected, actual) {
+        return actual &lt; expected;
+      },
+      
+      failure_message: function(expected, actual, not) {
+        return 'expected ' + $.print(actual) + (not ? ' to not ' : ' to ') + 'be less than ' + $.print(expected);
+      }
+    },
+
+    be_lte: {
+      match: function(expected, actual) {
+        return actual &lt;= expected;
+      },
+      
+      failure_message: function(expected, actual, not) {
+        return 'expected ' + $.print(actual) + (not ? ' to not ' : ' to ') + 'be less than or equal to ' + $.print(expected);
+      }
+    },
+
     match: {
       match: function(expected, actual) {
         if (expected.constructor == RegExp)
@@ -62,19 +86,19 @@ Screw.Matchers = (function($) {
         else
           return actual.indexOf(expected) &gt; -1;
       },
-      
+
       failure_message: function(expected, actual, not) {
         return 'expected ' + $.print(actual) + (not ? ' to not match ' : ' to match ') + $.print(expected);
       }
     },
-    
+
     be_empty: {
       match: function(expected, actual) {
         if (actual.length == undefined) throw(actual.toString() + &quot; does not respond to length&quot;);
-        
+
         return actual.length == 0;
       },
-      
+
       failure_message: function(expected, actual, not) {
         return 'expected ' + $.print(actual) + (not ? ' to not be empty' : ' to be empty');
       }</diff>
      <filename>test/screw-unit/screw.matchers.js</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@
     &lt;script src=&quot;../dist/jj.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
     
     &lt;script src=&quot;./jj_spec.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
-    &lt;script src=&quot;./screw_jj_spec.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;./mock_spec.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
                  
     &lt;link rel=&quot;stylesheet&quot; href=&quot;./screw-unit/screw.css&quot; /&gt;
   &lt;/head&gt;</diff>
      <filename>test/suite.html</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>src/jj.js</filename>
    </removed>
    <removed>
      <filename>test/screw_jj_spec.js</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>a0a1bb93436f7e38176fd900922c286f9ca8b59a</id>
    </parent>
  </parents>
  <author>
    <name>Pat Nakajima</name>
    <email>patnakajima@gmail.com</email>
  </author>
  <url>http://github.com/nakajima/jj/commit/c442c5796f4332ff06b4aaa6237c43cfa0724e61</url>
  <id>c442c5796f4332ff06b4aaa6237c43cfa0724e61</id>
  <committed-date>2009-01-14T16:38:41-08:00</committed-date>
  <authored-date>2009-01-14T16:38:41-08:00</authored-date>
  <message>updated screw.unit, added JJ.satisfied() method for non-screw-unit dependent way of ensuring that mocked methods were called</message>
  <tree>c0383503b220556e12742fb7bc65bd97266e216b</tree>
  <committer>
    <name>Pat Nakajima</name>
    <email>patnakajima@gmail.com</email>
  </committer>
</commit>
