<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -343,17 +343,20 @@ module ThoughtBot # :nodoc:
       # 
       # Options:
       # * &lt;tt&gt;:through&lt;/tt&gt; - association name for &lt;tt&gt;has_many :through&lt;/tt&gt;
+      # * &lt;tt&gt;:dependent&lt;/tt&gt; - tests that the association makes use of the dependent option.      
       #
       # Example:
       #   should_have_many :friends
       #   should_have_many :enemies, :through =&gt; :friends
+      #   should_have_many :enemies, :dependent =&gt; :destroy
       #
       def should_have_many(*associations)
-        through = get_options!(associations, :through)
+        through, dependent = get_options!(associations, :through, :dependent)
         klass = model_class
         associations.each do |association|
           name = &quot;have many #{association}&quot;
           name += &quot; through #{through}&quot; if through
+          name += &quot; dependent =&gt; #{dependent}&quot; if dependent
           should name do
             reflection = klass.reflect_on_association(association)
             assert reflection, &quot;#{klass.name} does not have any relationship to #{association}&quot;
@@ -374,7 +377,9 @@ module ThoughtBot # :nodoc:
               else
                 fk = reflection.primary_key_name
               end
+              
               associated_klass = (reflection.options[:class_name] || association.to_s.classify).constantize
+              assert_equal dependent, reflection.options[:dependent], &quot;#{associated_klass.name} should have #{dependent.to_s} dependency&quot; if dependent              
               assert associated_klass.column_names.include?(fk.to_s), &quot;#{associated_klass.name} does not have a #{fk} foreign key.&quot;
             end
           end</diff>
      <filename>lib/shoulda/active_record_helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 class Tag &lt; ActiveRecord::Base
-  has_many :taggings
+  has_many :taggings, :dependent =&gt; :destroy
   has_many :posts, :through =&gt; :taggings
   
   validates_length_of :name, :minimum =&gt; 2</diff>
      <filename>test/rails_root/app/models/tag.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/../test_helper'
 class TagTest &lt; Test::Unit::TestCase
   load_all_fixtures
 
-  should_have_many :taggings
+  should_have_many :taggings, :dependent =&gt; :destroy
   should_have_many :posts
   
   should_ensure_length_at_least :name, 2</diff>
      <filename>test/unit/tag_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>71e52d9c40638cdf8480f7a4d206aa99aab8a6db</id>
    </parent>
  </parents>
  <author>
    <name>Chris O'Sullivan</name>
    <email>thechrisoshow@gmail.com</email>
  </author>
  <url>http://github.com/snowblink/shoulda/commit/2995ef728d224bd8fc02c8a9542b14a22c47bfb5</url>
  <id>2995ef728d224bd8fc02c8a9542b14a22c47bfb5</id>
  <committed-date>2008-05-23T07:49:32-07:00</committed-date>
  <authored-date>2008-05-23T07:44:20-07:00</authored-date>
  <message>Added dependent option to should_have_many</message>
  <tree>13bea3d6875c45d4ee62b3ea1d9c04b5d979a989</tree>
  <committer>
    <name>Chris O'Sullivan</name>
    <email>thechrisoshow@gmail.com</email>
  </committer>
</commit>
