<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/rails_root/app/models/treat.rb</filename>
    </added>
    <added>
      <filename>test/rails_root/db/migrate/011_create_treats.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -67,7 +67,12 @@ module Shoulda # :nodoc:
 
         attributes.each do |attribute|
           should &quot;require #{attribute} to be set&quot; do
-            assert_bad_value(klass, attribute, nil, message)
+            reflection = klass.reflect_on_association(attribute)
+            if reflection &amp;&amp; [:has_many, :has_and_belongs_to_many].include?(reflection.macro)
+              assert_bad_value(klass, attribute, [], message)
+            else
+              assert_bad_value(klass, attribute, nil, message)
+            end
           end
         end
       end</diff>
      <filename>lib/shoulda/active_record/macros.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,9 @@ module Pets
   class Dog &lt; ActiveRecord::Base
     belongs_to :user, :foreign_key =&gt; :owner_id
     belongs_to :address
+    has_many :treats
     has_and_belongs_to_many :fleas, :join_table =&gt; :fleas
+    validates_presence_of :treats, :fleas
     validates_presence_of :owner_id
   end
 end</diff>
      <filename>test/rails_root/app/models/pets/dog.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,8 @@ require File.dirname(__FILE__) + '/../test_helper'
 class Pets::DogTest &lt; Test::Unit::TestCase
   should_belong_to :user
   should_belong_to :address
+  should_have_many :treats
   should_have_and_belong_to_many :fleas
+  should_require_attributes :treats, :fleas
   should_require_attributes :owner_id
 end</diff>
      <filename>test/unit/dog_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bbdabffeb8db089f5cc3cdceb5399892a06486a9</id>
    </parent>
  </parents>
  <author>
    <name>Ryan McGeary</name>
    <email>ryanongit@mcgeary.org</email>
  </author>
  <url>http://github.com/thoughtbot/shoulda/commit/ef10377582ff3275ab72ccdab08f20d19ddb2fea</url>
  <id>ef10377582ff3275ab72ccdab08f20d19ddb2fea</id>
  <committed-date>2009-01-10T17:34:21-08:00</committed-date>
  <authored-date>2009-01-10T17:34:21-08:00</authored-date>
  <message>should_require_attributes now handles arrays (has_many and has_and_belongs_many) [#109]

Conflicts:

	lib/shoulda/active_record/macros.rb
	test/rails_root/app/models/dog.rb
	test/unit/dog_test.rb</message>
  <tree>f16141a21ae9a2f2727c2c6f98107fd86d6fe3e2</tree>
  <committer>
    <name>Ryan McGeary</name>
    <email>ryanongit@mcgeary.org</email>
  </committer>
</commit>
