<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -213,7 +213,7 @@ module Webrat
     
     def choose
       other_options.each do |option|
-        option.unset
+        option.set(nil)
       end
       
       set(@element[&quot;value&quot;] || &quot;on&quot;)</diff>
      <filename>lib/webrat/core/field.rb</filename>
    </modified>
    <modified>
      <diff>@@ -77,4 +77,19 @@ describe &quot;chooses&quot; do
     @session.should_receive(:post).with(&quot;/login&quot;, &quot;first_option&quot; =&gt; &quot;on&quot;)
     @session.clicks_button
   end
+  
+  it &quot;should result in the value of the selected radio button being posted when a subsequent one is checked by default&quot; do
+    @session.response_body = &lt;&lt;-EOS
+      &lt;form method=&quot;post&quot; action=&quot;/login&quot;&gt;
+        &lt;input id=&quot;user_gender_male&quot; name=&quot;user[gender]&quot; type=&quot;radio&quot; value=&quot;M&quot; /&gt;
+        &lt;label for=&quot;user_gender_male&quot;&gt;Male&lt;/label&gt;
+        &lt;input id=&quot;user_gender_female&quot; name=&quot;user[gender]&quot; type=&quot;radio&quot; value=&quot;F&quot; checked=&quot;checked&quot; /&gt;
+        &lt;label for=&quot;user_gender_female&quot;&gt;Female&lt;/label&gt;
+        &lt;input type=&quot;submit&quot; /&gt;
+      &lt;/form&gt;
+    EOS
+    @session.should_receive(:post).with(&quot;/login&quot;, &quot;user&quot; =&gt; {&quot;gender&quot; =&gt; &quot;M&quot;})
+    @session.chooses &quot;Male&quot;
+    @session.clicks_button
+  end
 end</diff>
      <filename>spec/api/chooses_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f904be9b2ce8260e61dd1eeb66d4ba6605ca4f2b</id>
    </parent>
  </parents>
  <author>
    <name>Luke Melia</name>
    <email>luke@lukemelia.com</email>
  </author>
  <url>http://github.com/brynary/webrat/commit/7c46a6fed0fe1b5ff4319515b6eeb60464133ce5</url>
  <id>7c46a6fed0fe1b5ff4319515b6eeb60464133ce5</id>
  <committed-date>2008-09-14T23:29:42-07:00</committed-date>
  <authored-date>2008-09-14T18:16:39-07:00</authored-date>
  <message>Fixed bug where choosing radio button in a series where a later radio button is defaulted to on resulted in the incorrect field value being submitted.</message>
  <tree>bc6603ce59faea0559bd5a2481748d54d6a1ea66</tree>
  <committer>
    <name>Luke Melia</name>
    <email>luke@lukemelia.com</email>
  </committer>
</commit>
