<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,18 @@
+== 1.1 2008-11-09
+
+* Refactored code to allow simple aliasing
+* Configurable connector deprecated (and removed) in favor of jShoulda.setShouldAlias method.
+* new global simbol: jShoulda
+* global methods `should` and `context` are now created through aliasing
+* Try this, babe
+
+    jShoulda.setContextAlias('describe').setShouldAlias('it', '');
+    describe(&quot;A context&quot;, {},
+      it(&quot;runs tests&quot;, function() {
+        this.assert(true);
+      })
+    )();
+
 == 1.0.1 2008-10-31
 
 * Configurable connector. Overwrite `should.connector` if you want to use a localized connector.</diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@ require 'rake/packagetask'
 
 $:.unshift File.dirname(__FILE__) + &quot;/lib&quot;
 
-APP_VERSION  = '1.0.1'
+APP_VERSION  = '1.1.0'
 APP_NAME     = 'jshoulda'
 RUBYFORGE_PROJECT = APP_NAME
 APP_TEMPLATE = &quot;#{APP_NAME}.js.erb&quot;</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -295,7 +295,7 @@ class JavaScriptTestTask &lt; ::Rake::TaskLib
 
   def define
     task @name do
-      trap(&quot;INT&quot;) { @server.shutdown }
+      trap(&quot;INT&quot;) { @server.shutdown; exit }
       t = Thread.new { @server.start }
       
       # run all combinations of browsers and tests</diff>
      <filename>lib/jstest.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,4 @@
-var context, should;
-(function() {
+var jShoulda = function() {
   // the test runner
   var tr;
 
@@ -26,7 +25,7 @@ var context, should;
     };
   }
   
-  context = function(name, obj) {
+  function context(name, obj) {
     obj.before = obj.setup || obj.before || dummy;
     obj.after = obj.teardown || obj.after || dummy;
     var queue = Array.prototype.slice.call(arguments, 2);
@@ -51,20 +50,46 @@ var context, should;
     };
   };
 
-  should = function(name, fn) {
-    return function(prefix, before, after) {
-      var beforeBatch = makeBatch(before);
-      var afterBatch = makeBatch(after);
-      return new Test.Unit.Testcase([prefix, name].join(' ' + should.connector + ' '), fn, beforeBatch, afterBatch);
+  
+  function getShouldAlias(connector) {
+    return function (name, fn) {
+      return function(prefix, before, after) {
+        var beforeBatch = makeBatch(before);
+        var afterBatch = makeBatch(after);
+        return new Test.Unit.Testcase([prefix, name].join(' ' + connector + ' '), fn, beforeBatch, afterBatch);
+      };    
     };
-  };
+  }
   
-  should.connector = 'should';
+  function setShouldAlias(name, host) {
+    var connector = name;
+    if (typeof host == 'string') {
+      connector = host;
+      host = arguments[2];
+    }
+    host = host || window;
+    host[name] = getShouldAlias(connector);
+    return jShoulda;
+  }
   
+  function setContextAlias(name, host) {
+    host = host || window;
+    host[name] = getContextAlias();
+    return jShoulda;
+  }
   
-})();
-
+  function getContextAlias() {
+    return context;
+  }
 
 
+  return {
+    setShouldAlias : setShouldAlias,
+    setContextAlias : setContextAlias,
+  }
 
+}();
 
+jShoulda
+  .setShouldAlias('should')
+  .setContextAlias('context');  </diff>
      <filename>src/jshoulda.js</filename>
    </modified>
    <modified>
      <diff>@@ -30,26 +30,30 @@
 &lt;script type=&quot;text/javascript&quot;&gt;
 // &lt;![CDATA[
 
+function getPreviousTestWording() {
+  var rows = document.getElementsByTagName('table')[0].getElementsByTagName('tbody')[0].getElementsByTagName('tr');
+  return rows[rows.length - 2].getElementsByTagName('td')[0].innerHTML.replace(/^\s+|\s+$/, '').replace(/\s+/, ' ');
+}
+
 jShoulda
-  .setShouldAlias('must', 'cabrito')
+  .setShouldAlias('shoulda', 'ya shoulda yay')
   .setContextAlias('describe')
-  .setShouldAlias('it', '');
+  .setShouldAlias('it', '')
+  .setShouldAlias('must');
 
 describe(&quot;jShoulda&quot;, {},
   should(&quot;expose a setShouldAlias&quot;, function() {
     this.assert(typeof jShoulda.setShouldAlias == 'function');
   }),
-  should(&quot;expose a getShouldAlias&quot;, function() {
-    this.assert(typeof jShoulda.getShouldAlias == 'function');
+  shoulda(&quot;accept weird connectors&quot;, function() {
+    this.assert(true);
+  }),
+  must('use weird wording in the previous test', function() {
+    this.assertEqual('jShoulda ya shoulda yay accept weird connectors', getPreviousTestWording());
   }),
-  context(&quot;with extra 'shouldy' methods&quot;, {
-    setup: function() {
-    }
-    },
-    it(&quot;run tests&quot;, function() {
-      this.assert(true);
-    })
-  )
+  it('really can say what you want', function() {
+    this.assertEqual('jShoulda must use weird wording in the previous test', getPreviousTestWording());
+  })
 )({testLog: &quot;testlog&quot;});
   // For each root context instance, specify the element id where results will be
   // published; e.g. &lt;div id=&quot;testlog&quot;/&gt; above.</diff>
      <filename>test/unit/factory_test.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0706f2f0da81cc6b1ac910e5c838678f2c89bf43</id>
    </parent>
  </parents>
  <author>
    <name>Choan Galvez</name>
    <email>choan.galvez@gmail.com</email>
  </author>
  <url>http://github.com/choan/jshoulda/commit/c46d6829900f51e9b9c2fe2b8c61dacb5ebb4e35</url>
  <id>c46d6829900f51e9b9c2fe2b8c61dacb5ebb4e35</id>
  <committed-date>2008-11-09T09:35:54-08:00</committed-date>
  <authored-date>2008-11-09T09:35:54-08:00</authored-date>
  <message>Aliasing methods completed</message>
  <tree>18ffccdd8c790bd8c88c71f76dacaa91268deeb6</tree>
  <committer>
    <name>Choan Galvez</name>
    <email>choan.galvez@gmail.com</email>
  </committer>
</commit>
