<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -16,7 +16,9 @@ module RspecHpricotMatchers
       @hdoc = hdoc_for(@actual)
 
       matched_elements = @hdoc.search(@selector)
-      return false if matched_elements.empty?
+      if matched_elements.empty?
+        return @options[:count] == 0
+      end
 
       if @inner_text
         matched_elements = filter_on_inner_text(matched_elements)</diff>
      <filename>lib/rspec_hpricot_matchers/have_tag.rb</filename>
    </modified>
    <modified>
      <diff>@@ -157,6 +157,10 @@ describe 'have_tag with counts' do
     @html.should_not have_tag('li', :count =&gt; 2..3)
   end
 
+  it &quot;should treat a :count of zero as if a negative match were expected&quot; do
+    @html.should have_tag('dd', :count =&gt; 0)
+  end
+
   it &quot;should treat :minimum as expecting at least n matched elements&quot; do
     (0..4).each { |n| @html.should have_tag('li', :minimum =&gt; n) }
     @html.should_not have_tag('li', :minimum =&gt; 5)</diff>
      <filename>spec/rspec_hpricot_matchers/have_tag_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>72534eab4d7154f790c97fb35a309e1a5a31cc5f</id>
    </parent>
  </parents>
  <author>
    <name>Kyle Hargraves</name>
    <email>philodespotos@gmail.com</email>
  </author>
  <url>http://github.com/collectiveidea/rspec_hpricot_matchers/commit/54f6522b2c0be754131ce1ee491c6245a34a174d</url>
  <id>54f6522b2c0be754131ce1ee491c6245a34a174d</id>
  <committed-date>2008-03-10T17:47:05-07:00</committed-date>
  <authored-date>2008-03-10T17:47:05-07:00</authored-date>
  <message>support have_tag(&quot;.foo&quot;, :count =&gt; 0)</message>
  <tree>d9669a12fddb59ea9e24ee56688584c3155e7238</tree>
  <committer>
    <name>Kyle Hargraves</name>
    <email>philodespotos@gmail.com</email>
  </committer>
</commit>
