<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,7 +8,7 @@ task :default =&gt; :test
 desc 'Test the labeling_form_builder plugin.'
 Rake::TestTask.new(:test) do |t|
   t.libs &lt;&lt; 'lib'
-  t.pattern = 'test/**/*_test.rb'
+  t.pattern = 'test/*_test.rb'
   t.verbose = true
 end
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,8 @@ class LabelingFormBuilder &lt; ActionView::Helpers::FormBuilder
   # so we would get double labels including them.
   def self.labelable
     ((field_helpers + public_instance_methods.grep(/select/)) - 
-    %w( form_for fields_for hidden_field password_field file_field )).map(&amp;:to_sym)
+    %w( form_for fields_for hidden_field password_field file_field field_set )).
+    map { |x| x.to_sym }
   end
   
   labelable.each do |helper|</diff>
      <filename>lib/labeling_form_builder.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,19 +8,19 @@ module ActionView::Helpers::FormTagHelper
   # so we would get double labels including them in the list.
   def self.labelable #:nodoc:
     public_instance_methods.
-    reject { |h| h =~ /form|submit|hidden|password|file/ || h =~ /_with(out)?_label/ }.
-    map(&amp;:to_sym)
+    reject { |h| h =~ /form|field_set|submit|hidden|password|file/ || h =~ /_with(out)?_label/ }.
+    map { |x| x.to_sym }
   end
   
   labelable.each do |helper|
     define_method &quot;#{helper}_with_label&quot; do |*args|
       label = extract_label_options! args
-          
+      
       handle_disparate_args! helper, args
-  
+      
       unlabeled_tag = send &quot;#{helper}_without_label&quot;, *args
       return unlabeled_tag unless label
-  
+      
       name = args.first.to_s
       label[:text] ||= name.humanize
       label[:for]  ||= name.gsub(/[^a-z0-9_-]+/, '_').gsub(/^_+|_+$/, '')
@@ -31,7 +31,15 @@ module ActionView::Helpers::FormTagHelper
     alias_method_chain helper, :label
   end
   
-private  
+  # Test doesn't work, dunno why.. use with caution..
+  def labeling_form_for(*args, &amp;block)
+    options = args.last.is_a?(Hash) ? args.pop : {}
+    options[:builder] = LabelingFormBuilder
+    args &lt;&lt; options
+    form_for *args, &amp;block
+  end
+  
+private
   # We want to account for certain optional arguments
   # that can occur before the options hash in the unlabeled helpers.
   #
@@ -40,7 +48,7 @@ private
   def handle_disparate_args!(helper, args) #:nodoc:
     # Ignore the options hash, if present, until we are done munging the args.
     options = args.pop if args.last.is_a? Hash
-
+    
     if args.size == 1
       if check_or_radio?(helper)
         args.insert 1, 1
@@ -50,13 +58,13 @@ private
         args.insert 1, nil
       end
     end
-
+    
     # :check_box_tag and :radio_button_tag can take another argument
     # to determine if they are 'checked' or not.
     if (2 == args.size) and check_or_radio?(helper)
       args.insert 2, false
     end
-
+    
     # Reunite the options with the rest of the args.
     args &lt;&lt; options if options
     </diff>
      <filename>lib/labeling_form_tag_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,29 @@
-require File.join(File.dirname(__FILE__), 'test_helper')
-require 'set'
-require 'labeling_form_tag_helper'
+%w(
+set
+rubygems
+action_controller
+action_view
+test/unit
+mocha
+).each { |x| require x }
+
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
+%w(
+labeling_form_tag_helper
+labeling_form_builder
+).each { |x| require x }
 
 class LabelingFormTagHelperTest &lt; Test::Unit::TestCase
   include ActionView::Helpers::TagHelper,
           ActionView::Helpers::FormTagHelper
-
+  
   def test_original_behavior
     labelable.each do |helper|
       assert_no_match %r(&lt;label), send(helper, :foo)
     end
   end
-
+  
   def test_custom_id_affects_label_for_attribute
     labelable.each do |helper|
       assert_match %r(&lt;label.+for=&quot;bar&quot;[^&gt;]*&gt;), send(helper, :foo, :id =&gt; :bar, :label =&gt; true)
@@ -79,11 +91,9 @@ class LabelingFormTagHelperTest &lt; Test::Unit::TestCase
     # This test is getting a little messy with the regexp approach.
     # TODO a better way to express those assertions?
     def test_with_merging_options
-    
       with_merging_options :label =&gt; { :text =&gt; 'bar' } do |foo|
         labelable.each do |helper|
           output = foo.send(helper, :foo, :label =&gt; { :class =&gt; 'baz' })
-        
           assert_match %r(bar&lt;/label&gt;), output
           assert_match %r(&lt;label .*?class=&quot;baz&quot;.*?&gt;), output
           assert_match %r(&lt;label .*?for=&quot;foo&quot;.*?&gt;), output
@@ -91,6 +101,24 @@ class LabelingFormTagHelperTest &lt; Test::Unit::TestCase
       end
     end
   rescue LoadError
+    puts 'with_merging_options not tested'
+  end
+  
+  def test_labeling_form_for
+    block = proc {}
+    args = [:foo, @foo]
+    args_with_builder_option = args &lt;&lt; { :builder =&gt; LabelingFormBuilder }
+    expects(:form_for).with(*args_with_builder_option, &amp;block)
+    labeling_form_for(*args, &amp;block)
+  end
+  
+  def test_labeling_form_for_with_options
+    block = proc {}
+    args = [:foo, @foo, { :method =&gt; :post }]
+    args_with_builder_option = args.dup
+    args_with_builder_option.last[:builder] = LabelingFormBuilder
+    expects(:form_for).with(*args_with_builder_option, &amp;block)
+    labeling_form_for(*args, &amp;block)
   end
   
 private</diff>
      <filename>test/labeling_form_tag_helper_test.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>test/test_helper.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>b3e22e4dd44ca846e824867f9a1f90b3cf2eda97</id>
    </parent>
  </parents>
  <author>
    <name>Seth Thomas Rasmussen</name>
    <email>sethrasmussen@gmail.com</email>
  </author>
  <url>http://github.com/greatseth/labeling-form-helper/commit/e92385efa01b248bb5e51c370c2cf8bca1f4bb8e</url>
  <id>e92385efa01b248bb5e51c370c2cf8bca1f4bb8e</id>
  <committed-date>2008-01-08T19:11:16-08:00</committed-date>
  <authored-date>2008-01-08T19:11:16-08:00</authored-date>
  <message>labeling_form_for, test don work tho

git-svn-id: http://sethrasmussen.com/svn/rails/plugins/labeling_form_helper@551 fb9bd3d9-41f6-4e67-aeff-99515e7e2596</message>
  <tree>852d62f6936a249fceea88bdfee217104b0c493d</tree>
  <committer>
    <name>Seth Thomas Rasmussen</name>
    <email>sethrasmussen@gmail.com</email>
  </committer>
</commit>
