<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,11 +10,11 @@ module Webrat
     elsif Nokogiri::XML::NodeSet === stringlike
       stringlike
     elsif StringIO === stringlike
-      Nokogiri::HTML(stringlike.string)
+      Nokogiri.parse(stringlike.string)
     elsif stringlike.respond_to?(:body)
-      Nokogiri::HTML(stringlike.body.to_s)
+      Nokogiri.parse(stringlike.body.to_s)
     else
-      Nokogiri::HTML(stringlike.to_s)
+      Nokogiri.parse(stringlike.to_s)
     end
   end
   </diff>
      <filename>lib/webrat/core/nokogiri.rb</filename>
    </modified>
    <modified>
      <diff>@@ -91,12 +91,14 @@ describe &quot;click_button&quot; do
   
   it &quot;should submit the form with the specified button&quot; do
     @session.response_body = &lt;&lt;-EOS
-      &lt;form method=&quot;get&quot; action=&quot;/form1&quot;&gt;
-        &lt;input type=&quot;submit&quot; /&gt;
-      &lt;/form&gt;
-      &lt;form method=&quot;get&quot; action=&quot;/form2&quot;&gt;
-        &lt;input type=&quot;submit&quot; value=&quot;Form2&quot; /&gt;
-      &lt;/form&gt;
+      &lt;html&gt;
+        &lt;form method=&quot;get&quot; action=&quot;/form1&quot;&gt;
+          &lt;input type=&quot;submit&quot; /&gt;
+        &lt;/form&gt;
+        &lt;form method=&quot;get&quot; action=&quot;/form2&quot;&gt;
+          &lt;input type=&quot;submit&quot; value=&quot;Form2&quot; /&gt;
+        &lt;/form&gt;
+      &lt;/html&gt;
     EOS
     @session.should_receive(:get).with(&quot;/form2&quot;, {})
     @session.click_button &quot;Form2&quot;</diff>
      <filename>spec/api/click_button_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -254,8 +254,10 @@ describe &quot;click_link&quot; do
   
   it &quot;should choose the shortest link text match&quot; do
     @session.response_body = &lt;&lt;-EOS
-    &lt;a href=&quot;/page1&quot;&gt;Linkerama&lt;/a&gt;
-    &lt;a href=&quot;/page2&quot;&gt;Link&lt;/a&gt;
+    &lt;html&gt;
+      &lt;a href=&quot;/page1&quot;&gt;Linkerama&lt;/a&gt;
+      &lt;a href=&quot;/page2&quot;&gt;Link&lt;/a&gt;
+    &lt;/html&gt;
     EOS
     
     @session.should_receive(:get).with(&quot;/page2&quot;, {})
@@ -264,7 +266,9 @@ describe &quot;click_link&quot; do
   
   it &quot;should treat non-breaking spaces as spaces&quot; do
     @session.response_body = &lt;&lt;-EOS
-    &lt;a href=&quot;/page1&quot;&gt;This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;link&lt;/a&gt;
+    &lt;html&gt;
+      &lt;a href=&quot;/page1&quot;&gt;This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;link&lt;/a&gt;
+    &lt;/html&gt;
     EOS
     
     @session.should_receive(:get).with(&quot;/page1&quot;, {})
@@ -284,10 +288,12 @@ describe &quot;click_link&quot; do
   
   it &quot;should click link within a selector&quot; do
     @session.response_body = &lt;&lt;-EOS
+    &lt;html&gt;
     &lt;a href=&quot;/page1&quot;&gt;Link&lt;/a&gt;
     &lt;div id=&quot;container&quot;&gt;
       &lt;a href=&quot;/page2&quot;&gt;Link&lt;/a&gt;
     &lt;/div&gt;
+    &lt;/html&gt;
     EOS
     
     @session.should_receive(:get).with(&quot;/page2&quot;, {})</diff>
      <filename>spec/api/click_link_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,6 @@ describe Webrat::Matchers do
   
   describe &quot;#have_xpath&quot; do
     it &quot;should work with non-HTML documents&quot; do
-      pending &quot;Bugfix&quot;
       xml = '&lt;foo bar=&quot;baz&quot;&gt;&lt;/foo&gt;'
       xml.should have_xpath('/foo[@bar=&quot;baz&quot;]')
     end</diff>
      <filename>spec/api/matchers_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,12 +7,14 @@ describe &quot;within&quot; do
   
   it &quot;should work when nested&quot; do
     @session.response_body = &lt;&lt;-EOS
+      &lt;html&gt;
       &lt;div&gt;
         &lt;a href=&quot;/page1&quot;&gt;Link&lt;/a&gt;
       &lt;/div&gt;
       &lt;div id=&quot;container&quot;&gt;
         &lt;div&gt;&lt;a href=&quot;/page2&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
       &lt;/div&gt;
+      &lt;/html&gt;
     EOS
     
     @session.should_receive(:get).with(&quot;/page2&quot;, {})
@@ -25,10 +27,12 @@ describe &quot;within&quot; do
   
   it &quot;should click links within a scope&quot; do
     @session.response_body = &lt;&lt;-EOS
+      &lt;html&gt;
       &lt;a href=&quot;/page1&quot;&gt;Link&lt;/a&gt;
       &lt;div id=&quot;container&quot;&gt;
         &lt;a href=&quot;/page2&quot;&gt;Link&lt;/a&gt;
       &lt;/div&gt;
+      &lt;/html&gt;
     EOS
     
     @session.should_receive(:get).with(&quot;/page2&quot;, {})
@@ -39,6 +43,7 @@ describe &quot;within&quot; do
   
   it &quot;should submit forms within a scope&quot; do
     @session.response_body = &lt;&lt;-EOS
+      &lt;html&gt;
       &lt;form id=&quot;form1&quot; action=&quot;/form1&quot;&gt;
         &lt;label&gt;Email: &lt;input type=&quot;text&quot; name=&quot;email&quot; /&gt;
         &lt;input type=&quot;submit&quot; value=&quot;Add&quot; /&gt;
@@ -47,6 +52,7 @@ describe &quot;within&quot; do
         &lt;label&gt;Email: &lt;input type=&quot;text&quot; name=&quot;email&quot; /&gt;
         &lt;input type=&quot;submit&quot; value=&quot;Add&quot; /&gt;
       &lt;/form&gt;
+      &lt;/html&gt;
     EOS
     
     @session.should_receive(:get).with(&quot;/form2&quot;, &quot;email&quot; =&gt; &quot;test@example.com&quot;)
@@ -58,11 +64,13 @@ describe &quot;within&quot; do
   
   it &quot;should not find buttons outside of the scope&quot; do
     @session.response_body = &lt;&lt;-EOS
+      &lt;html&gt;
       &lt;form action=&quot;/form1&quot;&gt;
         &lt;input type=&quot;submit&quot; value=&quot;Add&quot; /&gt;
       &lt;/form&gt;
       &lt;form id=&quot;form2&quot; action=&quot;/form2&quot;&gt;
       &lt;/form&gt;
+      &lt;/html&gt;
     EOS
     
     @session.within &quot;#form2&quot; do</diff>
      <filename>spec/api/within_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bb5eac701d2ec5201f212ec079733f2c3ee34b55</id>
    </parent>
  </parents>
  <author>
    <name>Bryan Helmkamp</name>
    <email>bryan@brynary.com</email>
  </author>
  <url>http://github.com/brynary/webrat/commit/a8e02a6b6e686cc4fd7b9c16b5fec88ae14179c9</url>
  <id>a8e02a6b6e686cc4fd7b9c16b5fec88ae14179c9</id>
  <committed-date>2008-11-22T13:46:03-08:00</committed-date>
  <authored-date>2008-11-22T13:46:03-08:00</authored-date>
  <message>Switch to using Nokogiri.parse for XML/XHTML autodetection [#66 state:resolved]</message>
  <tree>9c87ae34b37b0ee7df56fbd9aeae243c114f4323</tree>
  <committer>
    <name>Bryan Helmkamp</name>
    <email>bryan@brynary.com</email>
  </committer>
</commit>
