<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/unit/styles_test.html</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,32 @@
+== 1.2.1 2009-02-24
+
+* New methods `useStyle` and `defineStyle`. Now for using the pair name &quot;describe/it&quot; all you have to do is
+
+		jShoulda.useStyle('describe');
+	
+	`context` and `should` methods are still exported by default. This may change soon.
+	
+	To define new styles, pass a style-name and a configuration object to `jShoulda.defineStyle`. Properties expected in the configuration are:
+	
+		* context: an array containing names and connectors for the exportable _context_ methods
+		* should: an array containing names and connectors for the exportable _should_ methods
+		* (optional) unify: unify runners when using this style
+	
+	Example:
+	
+		// defining an style (better in an external shared script)
+		jShoulda
+			.defineStyle('my_custom_style', {
+				context: [ 'some', 'A' ],
+				should: [ 'does', '', 'and', '' ],
+				unify: true
+			});
+		
+		// using it
+		jShoulda
+			.useStyle('my_custom_style');
+
+
 == 1.2 2008-11-20
 
 * By default, each root context creates a new Test.Unit.Runner instance, so if tests are loaded from multiple files (or the same file includes multiple root contexts), and logged to the same table, header will show incorrect data. (And worst, only one of the results would get logged by the rake task.)</diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,11 @@
 var jShoulda = function() {
   // the test runner
-  var tr, unique = false;
-
+  var tr,
+  // handle all testcases with the same testrunner
+  unique = false,
+  // styles definitions
+  styles = {};
+  
   function dummy() {
   };
   
@@ -24,6 +28,7 @@ var jShoulda = function() {
       }
     };
   }
+  
   function getContextAlias(prefix) {
     if (prefix) prefix += ' ';
     return function (name, config, args) {
@@ -50,7 +55,6 @@ var jShoulda = function() {
         // as its first argument
         var prefix = outerName;
         var is_root = !!(outerName == undefined || typeof outerName == 'object');
-        // debugger;
         if (is_root) {
           tr = (tr &amp;&amp; unique) ? tr : new Test.Unit.Runner({}, outerName || {});
           prefix = '';
@@ -113,21 +117,61 @@ var jShoulda = function() {
     return jShoulda;
   }
   
+  function useStyle(name) {
+    var style, i;
+    if (name in styles) {
+      style = styles[name];
+      if ('context' in style) {
+        for (i = 0; i &lt; style.context.length; i += 2) {
+          setContextAlias(style.context[i], style.context[i+1]);
+        }
+      }
+      if ('should' in style) {
+        for (i = 0; i &lt; style.should.length; i += 2) {
+          setShouldAlias(style.should[i], style.should[i+1]);
+        }
+      }
+      if (style.unify) unifyRunners();
+    }
+    else throw { name: 'UndefinedStyle', message: 'There is not &quot;'+name+'&quot; style defined' };
+    return jShoulda;
+  }
+  
+  function defineStyle(name, opts, aliases) {
+    styles[name] = opts;
+    for (var i = 2; i &lt; arguments.length; i += 1) {
+      styles[arguments[i]] = opts;
+    }
+    return jShoulda;
+  }
+
+  function unifyRunners (options) {
+    if (options) {
+      tr = options instanceof Test.Unit.Runner ? options : new Test.Unit.Runner({}, options || {});
+    }
+    unique = true;
+    return jShoulda;
+  }  
 
   return {
     setShouldAlias : setShouldAlias,
     setContextAlias : setContextAlias,
-    unifyRunners : function(options) {
-      if (options) {
-        tr = options instanceof Test.Unit.Runner ? options : new Test.Unit.Runner({}, options || {});
-      }
-      unique = true;
-      return jShoulda;
-    }
+    unifyRunners : unifyRunners,
+    useStyle : useStyle,
+    defineStyle: defineStyle
   };
 
 }();
 
 jShoulda
-  .setShouldAlias('should')
-  .setContextAlias('context');  
+  .defineStyle('describe', {
+    context: [ 'describe', '' ],
+    should: [ 'it', '' ],
+    unify: false
+  }, 'it')
+  .defineStyle('context', {
+    context : [ 'context', '' ],
+    should : [ 'should', 'should' ],
+    unify : false
+  }, 'should')
+  .useStyle('should');  </diff>
      <filename>src/jshoulda.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b7aadb74ade1b6a90b8bca8ab7f2ee85badde716</id>
    </parent>
  </parents>
  <author>
    <name>Choan Galvez</name>
    <email>choan.galvez@gmail.com</email>
  </author>
  <url>http://github.com/choan/jshoulda/commit/9fbcc229d9ab4e6d26d6e2e5ce291a097f34c2b9</url>
  <id>9fbcc229d9ab4e6d26d6e2e5ce291a097f34c2b9</id>
  <committed-date>2009-02-24T12:22:16-08:00</committed-date>
  <authored-date>2009-02-24T12:22:16-08:00</authored-date>
  <message>Style configuration</message>
  <tree>a2d91aa2a38f77c3f71bddfcf2aca0c88d60b8d3</tree>
  <committer>
    <name>Choan Galvez</name>
    <email>choan.galvez@gmail.com</email>
  </committer>
</commit>
