<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -40,54 +40,8 @@ spec = {
   contexts = {}, passed = 0, failed = 0, verbose = false, current = nil
 }
 
--- Report spec failure and success rates
-spec.report = function ()
-  local total = spec.passed + spec.failed
-  local percent = spec.passed/total*100
-  local contexts = spec.contexts
-  local summery
-  
-  if spec.failed == 0 and not spec.verbose then
-    print &quot;all tests passed&quot;
-    return
-  end
-  
-  -- HACK: preserve hash ordering
-  for index = 1, #contexts do
-    local context, cases = contexts[index], contexts[contexts[index]]
-    print ((&quot;%s\n================================&quot;):format(context))
-    
-    for description, result in pairs(cases) do
-      local outcome = result.passed and 'pass' or &quot;FAILED&quot;
-
-      if spec.verbose or not (spec.verbose and result.passed) then
-        print((&quot;%-70s [ %s ]&quot;):format(&quot; - &quot; .. description, outcome))
-
-        table.foreach(result.errors, function(index, error)
-          print (&quot;   &quot;.. index..&quot;. Failed expectation : &quot;.. error.message..&quot;\n   &quot;..error.trace)
-        end)
-      end
-    end
-  end
-  
-  summery = [[
-=========  Summery  ============
-  %s Expectations
-    Passed : %s, Failed : %s, Success rate : %.2f percent
-  ]]
-  
-  print (summery:format(total, spec.passed, spec.failed, percent))
-end
-
-spec.add_example = function()
-end;
-
-spec.add_expectation = function()
-end;
-
---
 -- Collection of should matchers
- 
+--
 matchers = {
   should_be = function(self, expected)
     if self.value ~= expected then
@@ -133,7 +87,7 @@ matchers = {
       return false, self.value .. &quot;doesn't match pattern &quot;..pattern
     end
     return true
-  end;	
+  end;  
 }
  
 matchers.should_equal = matchers.should_be
@@ -210,4 +164,42 @@ function describe(context)
   end
 end
 
+-- Report spec failure and success rates
+-- 
+spec.report = function ()
+  local total = spec.passed + spec.failed
+  local percent = spec.passed/total*100
+  local contexts = spec.contexts
+  local summery
+  
+  if spec.failed == 0 and not spec.verbose then
+    print &quot;all tests passed&quot;
+    return
+  end
+  
+  -- HACK: preserve hash ordering
+  for index = 1, #contexts do
+    local context, cases = contexts[index], contexts[contexts[index]]
+    print ((&quot;%s\n================================&quot;):format(context))
+    
+    for description, result in pairs(cases) do
+      local outcome = result.passed and 'pass' or &quot;FAILED&quot;
+
+      if spec.verbose or not (spec.verbose and result.passed) then
+        print((&quot;%-70s [ %s ]&quot;):format(&quot; - &quot; .. description, outcome))
 
+        table.foreach(result.errors, function(index, error)
+          print (&quot;   &quot;.. index..&quot;. Failed expectation : &quot;.. error.message..&quot;\n   &quot;..error.trace)
+        end)
+      end
+    end
+  end
+  
+  summery = [[
+=========  Summery  ============
+  %s Expectations
+    Passed : %s, Failed : %s, Success rate : %.2f percent
+  ]]
+  
+  print (summery:format(total, spec.passed, spec.failed, percent))
+end</diff>
      <filename>loonar/spec.lua</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cf862d0d2f0d9495aab9ab89440d62a160232e5f</id>
    </parent>
  </parents>
  <author>
    <name>taylor luk</name>
    <email>subjective@gmail.com</email>
  </author>
  <url>http://github.com/dahlia/loonar/commit/661088a74f54266d65b32a4e9d323db9a274f1a0</url>
  <id>661088a74f54266d65b32a4e9d323db9a274f1a0</id>
  <committed-date>2008-08-14T06:38:13-07:00</committed-date>
  <authored-date>2008-08-14T06:38:13-07:00</authored-date>
  <message>remove unused functions in spec library</message>
  <tree>dce7c141294e670ad3ade20fc601380f934d9ff3</tree>
  <committer>
    <name>taylor luk</name>
    <email>subjective@gmail.com</email>
  </committer>
</commit>
