<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -336,25 +336,31 @@ module ThoughtBot # :nodoc:
           should_set_the_flash_to nil
         end
         
-        # Macro that creates a test asserting that the controller assigned to @name
+        # Macro that creates a test asserting that the controller assigned to
+        # each of the named instance variable(s).
         #
         # Example:
         #
-        #   should_assign_to :user
-        def should_assign_to(name)
-          should &quot;assign @#{name}&quot; do
-            assert assigns(name.to_sym), &quot;The action isn't assigning to @#{name}&quot;
+        #   should_assign_to :user, :posts
+        def should_assign_to(*names)
+          names.each do |name|
+            should &quot;assign @#{name}&quot; do
+              assert assigns(name.to_sym), &quot;The action isn't assigning to @#{name}&quot;
+            end
           end
         end
 
-        # Macro that creates a test asserting that the controller did not assign to @name
+        # Macro that creates a test asserting that the controller did not assign to
+        # any of the named instance variable(s).
         #
         # Example:
         #
-        #   should_not_assign_to :user
-        def should_not_assign_to(name)
-          should &quot;not assign to @#{name}&quot; do
-            assert !assigns(name.to_sym), &quot;@#{name} was visible&quot;
+        #   should_not_assign_to :user, :posts
+        def should_not_assign_to(*names)
+          names.each do |name|
+            should &quot;not assign to @#{name}&quot; do
+              assert !assigns(name.to_sym), &quot;@#{name} was visible&quot;
+            end
           end
         end
 </diff>
      <filename>lib/shoulda/controller_tests/controller_tests.rb</filename>
    </modified>
    <modified>
      <diff>@@ -39,5 +39,15 @@ class PostsControllerTest &lt; Test::Unit::TestCase
       resource.create.params = { :title =&gt; &quot;first post&quot;, :body =&gt; 'blah blah blah'}
       resource.update.params = { :title =&gt; &quot;changed&quot; }
     end
+
+    context &quot;viewing posts for a user&quot; do
+      setup do
+        get :index, :user_id =&gt; users(:first)
+      end
+      should_respond_with :success
+      should_assign_to :user, :posts
+      should_not_assign_to :foo, :bar
+    end
   end
+
 end</diff>
      <filename>test/functional/posts_controller_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0de2794be2820ea22824aa6a6c3e4a940ab8f693</id>
    </parent>
  </parents>
  <author>
    <name>Bob Showalter</name>
    <email>showaltb@gmail.com</email>
  </author>
  <url>http://github.com/showaltb/shoulda/commit/cefcfe1205f3636615e0562bba0ff60d3bf02922</url>
  <id>cefcfe1205f3636615e0562bba0ff60d3bf02922</id>
  <committed-date>2008-07-31T08:26:27-07:00</committed-date>
  <authored-date>2008-07-31T08:26:27-07:00</authored-date>
  <message>Change should_assign_to and should_not_assign_to to allow multiple names (#22)</message>
  <tree>3ad87dc0f2392f87c23b39ce2f0b2af8d93fa1a8</tree>
  <committer>
    <name>Bob Showalter</name>
    <email>showaltb@gmail.com</email>
  </committer>
</commit>
