<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -43,6 +43,28 @@ module Test
         
         print &quot;P&quot;
       end
+      
+      # This method will define a test method using the description as the test name
+      # (&quot;pending function&quot; =&gt; &quot;test_pending_function&quot;)
+      # 
+      # Instead of doing this:
+      #
+      # def test_function_is_pending
+      #   pending &quot;this test is pending&quot;
+      # end
+      # 
+      # You can just do this:
+      #   
+      # pending &quot;function is pending&quot;
+      # 
+      # This method can be called with a block passed, the same as the instance method
+      # 
+      def self.pending(description = &quot;&quot;, &amp;block)
+        test_name = &quot;test_#{description.gsub(/\s+/,'_')}&quot;.to_sym
+        defined = instance_method(test_name) rescue false
+        raise &quot;#{test_name} is already defined in #{self}&quot; if defined
+        define_method(test_name) { pending(description, &amp;block) }
+      end
     end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/pending.rb</filename>
    </modified>
    <modified>
      <diff>@@ -51,4 +51,16 @@ class TestPending &lt; Test::Unit::TestCase
       assert_equal &quot;&lt;this is fail&gt; did not fail.&quot;, e.message
     end
   end
+  
+  def test_creates_test_method_when_called_on_self
+    TestPending.pending(&quot;this test is pending&quot;) do
+      assert true
+    end
+    
+    assert TestPending.instance_methods.include?('test_this_test_is_pending')
+    assert_raises(Test::Unit::AssertionFailedError) do
+      send(:test_this_test_is_pending)
+    end
+  end
+
 end
\ No newline at end of file</diff>
      <filename>test/test_pending.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a229861c929cb06c9b476360a0bd8e6f638897c1</id>
    </parent>
  </parents>
  <author>
    <name>John Duff</name>
    <email>duff.john@gmail.com</email>
  </author>
  <url>http://github.com/jeremymcanally/pending/commit/3e4524fb524a1f45106e30b606d03a70578211dc</url>
  <id>3e4524fb524a1f45106e30b606d03a70578211dc</id>
  <committed-date>2009-01-19T18:51:22-08:00</committed-date>
  <authored-date>2009-01-19T17:07:36-08:00</authored-date>
  <message>pending class method that will also define the test

Signed-off-by: Jeremy McAnally &lt;jeremymcanally@gmail.com&gt;</message>
  <tree>099c8ac8f2b117b4c158bb368a4bd548ef57f5d0</tree>
  <committer>
    <name>Jeremy McAnally</name>
    <email>jeremymcanally@gmail.com</email>
  </committer>
</commit>
