<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>coverage/-Library-Ruby-Gems-1_8-gems-rcov-0_8_1_2_0-lib-rcov_rb.html</filename>
    </added>
    <added>
      <filename>coverage/index.html</filename>
    </added>
    <added>
      <filename>coverage/lib-context-context_rb.html</filename>
    </added>
    <added>
      <filename>coverage/lib-context-core_ext-string_rb.html</filename>
    </added>
    <added>
      <filename>coverage/lib-context-lifecycle_rb.html</filename>
    </added>
    <added>
      <filename>coverage/lib-context-shared_behavior_rb.html</filename>
    </added>
    <added>
      <filename>coverage/lib-context-suite_rb.html</filename>
    </added>
    <added>
      <filename>coverage/lib-context-test_rb.html</filename>
    </added>
    <added>
      <filename>coverage/lib-context-version_rb.html</filename>
    </added>
    <added>
      <filename>coverage/lib-context_rb.html</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 Gem::Specification.new do |s|
   s.name     = &quot;context&quot;
-  s.version  = &quot;0.5&quot;
+  s.version  = &quot;0.5.2&quot;
   s.date     = &quot;2008-10-03&quot;
   s.summary  = &quot;Contexts and DSL sugar for your tests&quot;
   s.email    = &quot;jeremy@entp.com&quot;</diff>
      <filename>context.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,8 @@ class Test::Unit::TestCase
       send(&quot;before_#{period}_callbacks&quot;) &lt;&lt; block
     end
     
+    alias :setup :before
+    
     # Add logic to run after the tests (i.e., a +teardown+ method)
     #
     #     after do
@@ -21,6 +23,8 @@ class Test::Unit::TestCase
     def after(period = :each, &amp;block)
       send(&quot;after_#{period}_callbacks&quot;) &lt;&lt; block
     end
+    
+    alias :teardown :after
 
     def gather_callbacks(callback_type, period) # :nodoc:
       callbacks = superclass.respond_to?(:gather_callbacks) ? superclass.gather_callbacks(callback_type, period) : []
@@ -41,13 +45,15 @@ class Test::Unit::TestCase
     child.after_all_callbacks   = []
 
     child.class_eval do
-      def setup
+      def setup(&amp;block)
         super
+        
         run_each_callbacks :before
       end
 
       def teardown
         super
+
         run_each_callbacks :after
       end
     end</diff>
      <filename>lib/context/lifecycle.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module Context
   module VERSION #:nodoc:
     MAJOR = 0
     MINOR = 5
-    TINY  = 0
+    TINY  = 2
 
     STRING = [MAJOR, MINOR, TINY].join('.')
   end</diff>
      <filename>lib/context/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ class TestLifecycle &lt; Test::Unit::TestCase
   sample_test = context &quot;lifecycle&quot; do
     attr_reader :inherited_before_each_var, :inherited_before_each_var_2, :inherited_after_each_var, 
       :after_each_var, :inherited_before_all_var, :inherited_after_all_var, :before_all_var, :after_all_var, 
-      :superclass_before_each_var, :superclass_after_each_var, :superclass_before_all_var, :superclass_after_all_var
+      :superclass_before_each_var, :superclass_after_each_var, :superclass_before_all_var, :superclass_after_all_var, :one, :two
 
     before do
       @inherited_before_each_var = 3
@@ -127,4 +127,38 @@ class TestLifecycle &lt; Test::Unit::TestCase
       assert_equal 1, @test.after_all_var
     end
   end
+  
+  # Test that we aren't stomping on defined seutp method
+  context &quot;With setup/teardown methods&quot; do
+    before do
+      @result = Test::Unit::TestResult.new
+      @test = sample_test.new(&quot;test_lifecycle_foo&quot;)
+      
+      @test.class.setup do
+        @one = 1
+      end
+      
+      @test.class.teardown do
+        @two = 10
+      end
+      
+      @test.run(@result) { |inherited_after_each_var, v| }
+    end
+    
+    it &quot;runs setup method block a la Shoulda&quot; do
+      assert_equal 1, @test.one
+    end
+    
+    it &quot;runs setup method block and regular callbacks&quot; do
+      assert_equal 3, @test.inherited_before_each_var
+    end
+    
+    it &quot;runs teardown method block a la Shoulda&quot; do
+      assert_equal 10, @test.two
+    end
+    
+    it &quot;runs teardown method block and regular callbacks&quot; do
+      assert_equal 1, @test.after_each_var
+    end
+  end
 end</diff>
      <filename>test/test_lifecycle.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3b0877d7126d401288628e249bb2be494c33610e</id>
    </parent>
  </parents>
  <author>
    <name>Jeremy McAnally</name>
    <email>jeremymcanally@gmail.com</email>
  </author>
  <url>http://github.com/jeremymcanally/context/commit/7554f2ac653d7140a36aee760513d5058eb73fe4</url>
  <id>7554f2ac653d7140a36aee760513d5058eb73fe4</id>
  <committed-date>2009-01-05T16:17:09-08:00</committed-date>
  <authored-date>2009-01-05T16:17:09-08:00</authored-date>
  <message>Add support for Shoulda-esque setup/do blocks.  Adding compat for Shoulda... ;)

Also: bumped version</message>
  <tree>98cb5d967841ed742d6e263b06a7058e78c5a459</tree>
  <committer>
    <name>Jeremy McAnally</name>
    <email>jeremymcanally@gmail.com</email>
  </committer>
</commit>
