<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,7 +10,7 @@ Assertions:: Many common rails testing idioms have been distilled into a set of
 
 = Usage
 
-=== Context Helpers (ThoughtBot::Shoulda::Context)
+=== Context Helpers (Shoulda::Context)
 
 Stop killing your fingers with all of those underscores...  Name your tests with plain sentences!
 
@@ -43,7 +43,7 @@ Produces the following test methods:
 
 So readable!
 
-=== ActiveRecord Tests (ThoughtBot::Shoulda::ActiveRecord::Macros)
+=== ActiveRecord Tests (Shoulda::ActiveRecord::Macros)
 
 Quick macro tests for your ActiveRecord associations and validations:
 
@@ -71,7 +71,7 @@ Quick macro tests for your ActiveRecord associations and validations:
 
 Makes TDD so much easier.
 
-=== Controller Tests (ThoughtBot::Shoulda::Controller::Macros)
+=== Controller Tests (Shoulda::Controller::Macros)
 
 Macros to test the most common controller patterns...
 
@@ -90,7 +90,7 @@ Macros to test the most common controller patterns...
     end
   end
 
-=== Helpful Assertions (ThoughtBot::Shoulda::Assertions)
+=== Helpful Assertions (Shoulda::Assertions)
 
 More to come here, but have fun with what's there.
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,7 @@ task :default =&gt; ['test']
 
 spec = Gem::Specification.new do |s|
   s.name              = &quot;shoulda&quot;
-  s.version           = Thoughtbot::Shoulda::VERSION
+  s.version           = Shoulda::VERSION
   s.summary           = &quot;Making tests easy on the fingers and eyes&quot;
   s.homepage          = &quot;http://thoughtbot.com/projects/shoulda&quot;
   s.rubyforge_project = &quot;shoulda&quot;</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -8,10 +8,10 @@ require 'shoulda/rails' if defined? RAILS_ROOT
 module Test # :nodoc: all
   module Unit
     class TestCase
-      extend Thoughtbot::Shoulda
-      include ThoughtBot::Shoulda::Assertions
-      extend ThoughtBot::Shoulda::Macros
-      include ThoughtBot::Shoulda::Helpers
+      extend Shoulda
+      include Shoulda::Assertions
+      extend Shoulda::Macros
+      include Shoulda::Helpers
     end
   end
 end</diff>
      <filename>lib/shoulda.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ require 'shoulda/action_mailer/assertions'
 module Test # :nodoc: all
   module Unit
     class TestCase
-      include ThoughtBot::Shoulda::ActionMailer::Assertions
+      include Shoulda::ActionMailer::Assertions
     end
   end
 end</diff>
      <filename>lib/shoulda/action_mailer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,39 +1,38 @@
-module ThoughtBot # :nodoc:
-  module Shoulda # :nodoc:
-    module ActionMailer # :nodoc:
-      module Assertions
-        # Asserts that an email was delivered.  Can take a block that can further
-        # narrow down the types of emails you're expecting.
-        #
-        #  assert_sent_email
-        #
-        # Passes if ActionMailer::Base.deliveries has an email
-        #
-        #  assert_sent_email do |email|
-        #    email.subject =~ /hi there/ &amp;&amp; email.to.include?('none@none.com')
-        #  end
-        #
-        # Passes if there is an email with subject containing 'hi there' and
-        # 'none@none.com' as one of the recipients.
-        #
-        def assert_sent_email
-          emails = ::ActionMailer::Base.deliveries
-          assert !emails.empty?, &quot;No emails were sent&quot;
-          if block_given?
-            matching_emails = emails.select {|email| yield email }
-            assert !matching_emails.empty?, &quot;None of the emails matched.&quot;
-          end
+module Shoulda # :nodoc:
+  module ActionMailer # :nodoc:
+    module Assertions
+      # Asserts that an email was delivered.  Can take a block that can further
+      # narrow down the types of emails you're expecting.
+      #
+      #  assert_sent_email
+      #
+      # Passes if ActionMailer::Base.deliveries has an email
+      #
+      #  assert_sent_email do |email|
+      #    email.subject =~ /hi there/ &amp;&amp; email.to.include?('none@none.com')
+      #  end
+      #
+      # Passes if there is an email with subject containing 'hi there' and
+      # 'none@none.com' as one of the recipients.
+      #
+      def assert_sent_email
+        emails = ::ActionMailer::Base.deliveries
+        assert !emails.empty?, &quot;No emails were sent&quot;
+        if block_given?
+          matching_emails = emails.select {|email| yield email }
+          assert !matching_emails.empty?, &quot;None of the emails matched.&quot;
         end
+      end
 
-        # Asserts that no ActionMailer mails were delivered
-        #
-        #  assert_did_not_send_email
-        def assert_did_not_send_email
-          msg = &quot;Sent #{::ActionMailer::Base.deliveries.size} emails.\n&quot;
-          ::ActionMailer::Base.deliveries.each { |m| msg &lt;&lt; &quot;  '#{m.subject}' sent to #{m.to.to_sentence}\n&quot; }
-          assert ::ActionMailer::Base.deliveries.empty?, msg
-        end
+      # Asserts that no ActionMailer mails were delivered
+      #
+      #  assert_did_not_send_email
+      def assert_did_not_send_email
+        msg = &quot;Sent #{::ActionMailer::Base.deliveries.size} emails.\n&quot;
+        ::ActionMailer::Base.deliveries.each { |m| msg &lt;&lt; &quot;  '#{m.subject}' sent to #{m.to.to_sentence}\n&quot; }
+        assert ::ActionMailer::Base.deliveries.empty?, msg
       end
     end
   end
 end
+</diff>
      <filename>lib/shoulda/action_mailer/assertions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,8 +5,8 @@ require 'shoulda/active_record/macros'
 module Test # :nodoc: all
   module Unit
     class TestCase
-      include ThoughtBot::Shoulda::ActiveRecord::Assertions
-      extend ThoughtBot::Shoulda::ActiveRecord::Macros
+      include Shoulda::ActiveRecord::Assertions
+      extend Shoulda::ActiveRecord::Macros
     end
   end
 end</diff>
      <filename>lib/shoulda/active_record.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,86 +1,84 @@
-module ThoughtBot # :nodoc:
-  module Shoulda # :nodoc:
-    module ActiveRecord # :nodoc:
-      module Assertions
-        # Asserts that the given object can be saved
-        #
-        #  assert_save User.new(params)
-        def assert_save(obj)
-          assert obj.save, &quot;Errors: #{pretty_error_messages obj}&quot;
-          obj.reload
-        end
+module Shoulda # :nodoc:
+  module ActiveRecord # :nodoc:
+    module Assertions
+      # Asserts that the given object can be saved
+      #
+      #  assert_save User.new(params)
+      def assert_save(obj)
+        assert obj.save, &quot;Errors: #{pretty_error_messages obj}&quot;
+        obj.reload
+      end
 
-        # Asserts that the given object is valid
-        #
-        #  assert_valid User.new(params)
-        def assert_valid(obj)
-          assert obj.valid?, &quot;Errors: #{pretty_error_messages obj}&quot;
-        end
+      # Asserts that the given object is valid
+      #
+      #  assert_valid User.new(params)
+      def assert_valid(obj)
+        assert obj.valid?, &quot;Errors: #{pretty_error_messages obj}&quot;
+      end
 
-        # Asserts that an Active Record model validates with the passed
-        # &lt;tt&gt;value&lt;/tt&gt; by making sure the &lt;tt&gt;error_message_to_avoid&lt;/tt&gt; is not
-        # contained within the list of errors for that attribute.
-        #
-        #   assert_good_value(User.new, :email, &quot;user@example.com&quot;)
-        #   assert_good_value(User.new, :ssn, &quot;123456789&quot;, /length/)
-        #
-        # If a class is passed as the first argument, a new object will be
-        # instantiated before the assertion.  If an instance variable exists with
-        # the same name as the class (underscored), that object will be used
-        # instead.
-        #
-        #   assert_good_value(User, :email, &quot;user@example.com&quot;)
-        #
-        #   @product = Product.new(:tangible =&gt; false)
-        #   assert_good_value(Product, :price, &quot;0&quot;)
-        def assert_good_value(object_or_klass, attribute, value, error_message_to_avoid = //)
-          object = get_instance_of(object_or_klass)
-          object.send(&quot;#{attribute}=&quot;, value)
-          object.valid?
-          assert_does_not_contain(object.errors.on(attribute), error_message_to_avoid, &quot;when set to #{value.inspect}&quot;)
-        end
+      # Asserts that an Active Record model validates with the passed
+      # &lt;tt&gt;value&lt;/tt&gt; by making sure the &lt;tt&gt;error_message_to_avoid&lt;/tt&gt; is not
+      # contained within the list of errors for that attribute.
+      #
+      #   assert_good_value(User.new, :email, &quot;user@example.com&quot;)
+      #   assert_good_value(User.new, :ssn, &quot;123456789&quot;, /length/)
+      #
+      # If a class is passed as the first argument, a new object will be
+      # instantiated before the assertion.  If an instance variable exists with
+      # the same name as the class (underscored), that object will be used
+      # instead.
+      #
+      #   assert_good_value(User, :email, &quot;user@example.com&quot;)
+      #
+      #   @product = Product.new(:tangible =&gt; false)
+      #   assert_good_value(Product, :price, &quot;0&quot;)
+      def assert_good_value(object_or_klass, attribute, value, error_message_to_avoid = //)
+        object = get_instance_of(object_or_klass)
+        object.send(&quot;#{attribute}=&quot;, value)
+        object.valid?
+        assert_does_not_contain(object.errors.on(attribute), error_message_to_avoid, &quot;when set to #{value.inspect}&quot;)
+      end
 
-        # Asserts that an Active Record model invalidates the passed
-        # &lt;tt&gt;value&lt;/tt&gt; by making sure the &lt;tt&gt;error_message_to_expect&lt;/tt&gt; is
-        # contained within the list of errors for that attribute.
-        #
-        #   assert_bad_value(User.new, :email, &quot;invalid&quot;)
-        #   assert_bad_value(User.new, :ssn, &quot;123&quot;, /length/)
-        #
-        # If a class is passed as the first argument, a new object will be
-        # instantiated before the assertion.  If an instance variable exists with
-        # the same name as the class (underscored), that object will be used
-        # instead.
-        #
-        #   assert_bad_value(User, :email, &quot;invalid&quot;)
-        #
-        #   @product = Product.new(:tangible =&gt; true)
-        #   assert_bad_value(Product, :price, &quot;0&quot;)
-        def assert_bad_value(object_or_klass, attribute, value,
-                             error_message_to_expect = self.class.default_error_message(:invalid))
-          object = get_instance_of(object_or_klass)
-          object.send(&quot;#{attribute}=&quot;, value)
-          assert !object.valid?, &quot;#{object.class} allowed #{value.inspect} as a value for #{attribute}&quot;
-          assert object.errors.on(attribute), &quot;There are no errors on #{attribute} after being set to #{value.inspect}&quot;
-          assert_contains(object.errors.on(attribute), error_message_to_expect, &quot;when set to #{value.inspect}&quot;)
-        end
+      # Asserts that an Active Record model invalidates the passed
+      # &lt;tt&gt;value&lt;/tt&gt; by making sure the &lt;tt&gt;error_message_to_expect&lt;/tt&gt; is
+      # contained within the list of errors for that attribute.
+      #
+      #   assert_bad_value(User.new, :email, &quot;invalid&quot;)
+      #   assert_bad_value(User.new, :ssn, &quot;123&quot;, /length/)
+      #
+      # If a class is passed as the first argument, a new object will be
+      # instantiated before the assertion.  If an instance variable exists with
+      # the same name as the class (underscored), that object will be used
+      # instead.
+      #
+      #   assert_bad_value(User, :email, &quot;invalid&quot;)
+      #
+      #   @product = Product.new(:tangible =&gt; true)
+      #   assert_bad_value(Product, :price, &quot;0&quot;)
+      def assert_bad_value(object_or_klass, attribute, value,
+                           error_message_to_expect = self.class.default_error_message(:invalid))
+        object = get_instance_of(object_or_klass)
+        object.send(&quot;#{attribute}=&quot;, value)
+        assert !object.valid?, &quot;#{object.class} allowed #{value.inspect} as a value for #{attribute}&quot;
+        assert object.errors.on(attribute), &quot;There are no errors on #{attribute} after being set to #{value.inspect}&quot;
+        assert_contains(object.errors.on(attribute), error_message_to_expect, &quot;when set to #{value.inspect}&quot;)
+      end
 
-        def pretty_error_messages(obj)
-          obj.errors.map do |a, m| 
-            msg = &quot;#{a} #{m}&quot; 
-            msg &lt;&lt; &quot; (#{obj.send(a).inspect})&quot; unless a.to_sym == :base
-          end
+      def pretty_error_messages(obj)
+        obj.errors.map do |a, m| 
+          msg = &quot;#{a} #{m}&quot; 
+          msg &lt;&lt; &quot; (#{obj.send(a).inspect})&quot; unless a.to_sym == :base
         end
+      end
 
-        private
+      private
 
-        def get_instance_of(object_or_klass)
-          if object_or_klass.is_a?(Class)
-            klass = object_or_klass
-            instance_variable_get(&quot;@#{klass.to_s.underscore}&quot;) || klass.new
-          else
-            object_or_klass
-          end
+      def get_instance_of(object_or_klass)
+        if object_or_klass.is_a?(Class)
+          klass = object_or_klass
+          instance_variable_get(&quot;@#{klass.to_s.underscore}&quot;) || klass.new
+        else
+          object_or_klass
         end
       end
     end</diff>
      <filename>lib/shoulda/active_record/assertions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,711 +1,709 @@
-module ThoughtBot # :nodoc:
-  module Shoulda # :nodoc:
-    module ActiveRecord # :nodoc:
-      module MacroHelpers # :nodoc:
-        # Helper method that determines the default error message used by Active
-        # Record.  Works for both existing Rails 2.1 and Rails 2.2 with the newly
-        # introduced I18n module used for localization.
-        #
-        #   default_error_message(:blank)
-        #   default_error_message(:too_short, :count =&gt; 5)
-        #   default_error_message(:too_long, :count =&gt; 60)
-        def default_error_message(key, values = {})
-          if Object.const_defined?(:I18n) # Rails &gt;= 2.2
-            I18n.translate(&quot;activerecord.errors.messages.#{key}&quot;, values)
-          else # Rails &lt;= 2.1.x
-            ::ActiveRecord::Errors.default_error_messages[key] % values[:count]
-          end
+module Shoulda # :nodoc:
+  module ActiveRecord # :nodoc:
+    module MacroHelpers # :nodoc:
+      # Helper method that determines the default error message used by Active
+      # Record.  Works for both existing Rails 2.1 and Rails 2.2 with the newly
+      # introduced I18n module used for localization.
+      #
+      #   default_error_message(:blank)
+      #   default_error_message(:too_short, :count =&gt; 5)
+      #   default_error_message(:too_long, :count =&gt; 60)
+      def default_error_message(key, values = {})
+        if Object.const_defined?(:I18n) # Rails &gt;= 2.2
+          I18n.translate(&quot;activerecord.errors.messages.#{key}&quot;, values)
+        else # Rails &lt;= 2.1.x
+          ::ActiveRecord::Errors.default_error_messages[key] % values[:count]
         end
       end
+    end
 
-      # = Macro test helpers for your active record models
+    # = Macro test helpers for your active record models
+    #
+    # These helpers will test most of the validations and associations for your ActiveRecord models.
+    #
+    #   class UserTest &lt; Test::Unit::TestCase
+    #     should_require_attributes :name, :phone_number
+    #     should_not_allow_values_for :phone_number, &quot;abcd&quot;, &quot;1234&quot;
+    #     should_allow_values_for :phone_number, &quot;(123) 456-7890&quot;
+    #
+    #     should_protect_attributes :password
+    #
+    #     should_have_one :profile
+    #     should_have_many :dogs
+    #     should_have_many :messes, :through =&gt; :dogs
+    #     should_belong_to :lover
+    #   end
+    #
+    # For all of these helpers, the last parameter may be a hash of options.
+    #
+    module Macros
+      include MacroHelpers
+
+      # &lt;b&gt;DEPRECATED:&lt;/b&gt; Use &lt;tt&gt;fixtures :all&lt;/tt&gt; instead
       #
-      # These helpers will test most of the validations and associations for your ActiveRecord models.
+      # Loads all fixture files (&lt;tt&gt;test/fixtures/*.yml&lt;/tt&gt;)
+      def load_all_fixtures
+        warn &quot;[DEPRECATION] load_all_fixtures is deprecated.  Use `fixtures :all` instead.&quot;
+        fixtures :all
+      end
+
+      # Ensures that the model cannot be saved if one of the attributes listed is not present.
       #
-      #   class UserTest &lt; Test::Unit::TestCase
-      #     should_require_attributes :name, :phone_number
-      #     should_not_allow_values_for :phone_number, &quot;abcd&quot;, &quot;1234&quot;
-      #     should_allow_values_for :phone_number, &quot;(123) 456-7890&quot;
+      # If an instance variable has been created in the setup named after the
+      # model being tested, then this method will use that.  Otherwise, it will
+      # create a new instance to test against.
       #
-      #     should_protect_attributes :password
+      # Options:
+      # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.blank')&lt;/tt&gt;
       #
-      #     should_have_one :profile
-      #     should_have_many :dogs
-      #     should_have_many :messes, :through =&gt; :dogs
-      #     should_belong_to :lover
-      #   end
+      # Example:
+      #   should_require_attributes :name, :phone_number
       #
-      # For all of these helpers, the last parameter may be a hash of options.
-      #
-      module Macros
-        include MacroHelpers
-
-        # &lt;b&gt;DEPRECATED:&lt;/b&gt; Use &lt;tt&gt;fixtures :all&lt;/tt&gt; instead
-        #
-        # Loads all fixture files (&lt;tt&gt;test/fixtures/*.yml&lt;/tt&gt;)
-        def load_all_fixtures
-          warn &quot;[DEPRECATION] load_all_fixtures is deprecated.  Use `fixtures :all` instead.&quot;
-          fixtures :all
-        end
-
-        # Ensures that the model cannot be saved if one of the attributes listed is not present.
-        #
-        # If an instance variable has been created in the setup named after the
-        # model being tested, then this method will use that.  Otherwise, it will
-        # create a new instance to test against.
-        #
-        # Options:
-        # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.blank')&lt;/tt&gt;
-        #
-        # Example:
-        #   should_require_attributes :name, :phone_number
-        #
-        def should_require_attributes(*attributes)
-          message = get_options!(attributes, :message)
-          message ||= default_error_message(:blank)
-          klass = model_class
-
-          attributes.each do |attribute|
-            should &quot;require #{attribute} to be set&quot; do
-              assert_bad_value(klass, attribute, nil, message)
-            end
+      def should_require_attributes(*attributes)
+        message = get_options!(attributes, :message)
+        message ||= default_error_message(:blank)
+        klass = model_class
+
+        attributes.each do |attribute|
+          should &quot;require #{attribute} to be set&quot; do
+            assert_bad_value(klass, attribute, nil, message)
           end
         end
+      end
 
-        # Ensures that the model cannot be saved if one of the attributes listed is not unique.
-        # Requires an existing record
-        #
-        # Options:
-        # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.taken')&lt;/tt&gt;
-        # * &lt;tt&gt;:scoped_to&lt;/tt&gt; - field(s) to scope the uniqueness to.
-        #
-        # Examples:
-        #   should_require_unique_attributes :keyword, :username
-        #   should_require_unique_attributes :name, :message =&gt; &quot;O NOES! SOMEONE STOELED YER NAME!&quot;
-        #   should_require_unique_attributes :email, :scoped_to =&gt; :name
-        #   should_require_unique_attributes :address, :scoped_to =&gt; [:first_name, :last_name]
-        #
-        def should_require_unique_attributes(*attributes)
-          message, scope = get_options!(attributes, :message, :scoped_to)
-          scope = [*scope].compact
-          message ||= default_error_message(:taken)
-
-          klass = model_class
-          attributes.each do |attribute|
-            attribute = attribute.to_sym
-            should &quot;require unique value for #{attribute}#{&quot; scoped to #{scope.join(', ')}&quot; unless scope.blank?}&quot; do
-              assert existing = klass.find(:first), &quot;Can't find first #{klass}&quot;
-              object = klass.new
-              existing_value = existing.send(attribute)
-
-              if !scope.blank?
-                scope.each do |s|
-                  assert_respond_to object, :&quot;#{s}=&quot;, &quot;#{klass.name} doesn't seem to have a #{s} attribute.&quot;
-                  object.send(&quot;#{s}=&quot;, existing.send(s))
-                end
+      # Ensures that the model cannot be saved if one of the attributes listed is not unique.
+      # Requires an existing record
+      #
+      # Options:
+      # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.taken')&lt;/tt&gt;
+      # * &lt;tt&gt;:scoped_to&lt;/tt&gt; - field(s) to scope the uniqueness to.
+      #
+      # Examples:
+      #   should_require_unique_attributes :keyword, :username
+      #   should_require_unique_attributes :name, :message =&gt; &quot;O NOES! SOMEONE STOELED YER NAME!&quot;
+      #   should_require_unique_attributes :email, :scoped_to =&gt; :name
+      #   should_require_unique_attributes :address, :scoped_to =&gt; [:first_name, :last_name]
+      #
+      def should_require_unique_attributes(*attributes)
+        message, scope = get_options!(attributes, :message, :scoped_to)
+        scope = [*scope].compact
+        message ||= default_error_message(:taken)
+
+        klass = model_class
+        attributes.each do |attribute|
+          attribute = attribute.to_sym
+          should &quot;require unique value for #{attribute}#{&quot; scoped to #{scope.join(', ')}&quot; unless scope.blank?}&quot; do
+            assert existing = klass.find(:first), &quot;Can't find first #{klass}&quot;
+            object = klass.new
+            existing_value = existing.send(attribute)
+
+            if !scope.blank?
+              scope.each do |s|
+                assert_respond_to object, :&quot;#{s}=&quot;, &quot;#{klass.name} doesn't seem to have a #{s} attribute.&quot;
+                object.send(&quot;#{s}=&quot;, existing.send(s))
               end
-              assert_bad_value(object, attribute, existing_value, message)
-
-              # Now test that the object is valid when changing the scoped attribute
-              # TODO:  There is a chance that we could change the scoped field
-              # to a value that's already taken.  An alternative implementation
-              # could actually find all values for scope and create a unique
-              # one.
-              if !scope.blank?
-                scope.each do |s|
-                  # Assume the scope is a foreign key if the field is nil
-                  object.send(&quot;#{s}=&quot;, existing.send(s).nil? ? 1 : existing.send(s).next)
-                  assert_good_value(object, attribute, existing_value, message)
-                end
+            end
+            assert_bad_value(object, attribute, existing_value, message)
+
+            # Now test that the object is valid when changing the scoped attribute
+            # TODO:  There is a chance that we could change the scoped field
+            # to a value that's already taken.  An alternative implementation
+            # could actually find all values for scope and create a unique
+            # one.
+            if !scope.blank?
+              scope.each do |s|
+                # Assume the scope is a foreign key if the field is nil
+                object.send(&quot;#{s}=&quot;, existing.send(s).nil? ? 1 : existing.send(s).next)
+                assert_good_value(object, attribute, existing_value, message)
               end
             end
           end
         end
+      end
 
-        # Ensures that the attribute cannot be set on mass update.
-        #
-        #   should_protect_attributes :password, :admin_flag
-        #
-        def should_protect_attributes(*attributes)
-          get_options!(attributes)
-          klass = model_class
-
-          attributes.each do |attribute|
-            attribute = attribute.to_sym
-            should &quot;protect #{attribute} from mass updates&quot; do
-              protected = klass.protected_attributes || []
-              accessible = klass.accessible_attributes || []
-
-              assert protected.include?(attribute.to_s) ||
-                (!accessible.empty? &amp;&amp; !accessible.include?(attribute.to_s)),
-                     (accessible.empty? ?
-                       &quot;#{klass} is protecting #{protected.to_a.to_sentence}, but not #{attribute}.&quot; :
-                       &quot;#{klass} has made #{attribute} accessible&quot;)
-            end
+      # Ensures that the attribute cannot be set on mass update.
+      #
+      #   should_protect_attributes :password, :admin_flag
+      #
+      def should_protect_attributes(*attributes)
+        get_options!(attributes)
+        klass = model_class
+
+        attributes.each do |attribute|
+          attribute = attribute.to_sym
+          should &quot;protect #{attribute} from mass updates&quot; do
+            protected = klass.protected_attributes || []
+            accessible = klass.accessible_attributes || []
+
+            assert protected.include?(attribute.to_s) ||
+              (!accessible.empty? &amp;&amp; !accessible.include?(attribute.to_s)),
+                   (accessible.empty? ?
+                     &quot;#{klass} is protecting #{protected.to_a.to_sentence}, but not #{attribute}.&quot; :
+                     &quot;#{klass} has made #{attribute} accessible&quot;)
           end
         end
+      end
 
-        # Ensures that the attribute cannot be changed once the record has been created.
-        #
-        #   should_have_readonly_attributes :password, :admin_flag
-        #
-        def should_have_readonly_attributes(*attributes)
-          get_options!(attributes)
-          klass = model_class
+      # Ensures that the attribute cannot be changed once the record has been created.
+      #
+      #   should_have_readonly_attributes :password, :admin_flag
+      #
+      def should_have_readonly_attributes(*attributes)
+        get_options!(attributes)
+        klass = model_class
 
-          attributes.each do |attribute|
-            attribute = attribute.to_sym
-            should &quot;make #{attribute} read-only&quot; do
-              readonly = klass.readonly_attributes || []
+        attributes.each do |attribute|
+          attribute = attribute.to_sym
+          should &quot;make #{attribute} read-only&quot; do
+            readonly = klass.readonly_attributes || []
 
-              assert readonly.include?(attribute.to_s),
-                     (readonly.empty? ?
-                       &quot;#{klass} attribute #{attribute} is not read-only&quot; :
-                       &quot;#{klass} is making #{readonly.to_a.to_sentence} read-only, but not #{attribute}.&quot;)
-            end
+            assert readonly.include?(attribute.to_s),
+                   (readonly.empty? ?
+                     &quot;#{klass} attribute #{attribute} is not read-only&quot; :
+                     &quot;#{klass} is making #{readonly.to_a.to_sentence} read-only, but not #{attribute}.&quot;)
           end
         end
+      end
 
-        # Ensures that the attribute cannot be set to the given values
-        #
-        # If an instance variable has been created in the setup named after the
-        # model being tested, then this method will use that.  Otherwise, it will
-        # create a new instance to test against.
-        #
-        # Options:
-        # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.invalid')&lt;/tt&gt;
-        #
-        # Example:
-        #   should_not_allow_values_for :isbn, &quot;bad 1&quot;, &quot;bad 2&quot;
-        #
-        def should_not_allow_values_for(attribute, *bad_values)
-          message = get_options!(bad_values, :message)
-          message ||= default_error_message(:invalid)
-          klass = model_class
-          bad_values.each do |v|
-            should &quot;not allow #{attribute} to be set to #{v.inspect}&quot; do
-              assert_bad_value(klass, attribute, v, message)
-            end
+      # Ensures that the attribute cannot be set to the given values
+      #
+      # If an instance variable has been created in the setup named after the
+      # model being tested, then this method will use that.  Otherwise, it will
+      # create a new instance to test against.
+      #
+      # Options:
+      # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.invalid')&lt;/tt&gt;
+      #
+      # Example:
+      #   should_not_allow_values_for :isbn, &quot;bad 1&quot;, &quot;bad 2&quot;
+      #
+      def should_not_allow_values_for(attribute, *bad_values)
+        message = get_options!(bad_values, :message)
+        message ||= default_error_message(:invalid)
+        klass = model_class
+        bad_values.each do |v|
+          should &quot;not allow #{attribute} to be set to #{v.inspect}&quot; do
+            assert_bad_value(klass, attribute, v, message)
           end
         end
+      end
 
-        # Ensures that the attribute can be set to the given values.
-        #
-        # If an instance variable has been created in the setup named after the
-        # model being tested, then this method will use that.  Otherwise, it will
-        # create a new instance to test against.
-        #
-        # Example:
-        #   should_allow_values_for :isbn, &quot;isbn 1 2345 6789 0&quot;, &quot;ISBN 1-2345-6789-0&quot;
-        #
-        def should_allow_values_for(attribute, *good_values)
-          get_options!(good_values)
-          klass = model_class
-          good_values.each do |v|
-            should &quot;allow #{attribute} to be set to #{v.inspect}&quot; do
-              assert_good_value(klass, attribute, v)
-            end
+      # Ensures that the attribute can be set to the given values.
+      #
+      # If an instance variable has been created in the setup named after the
+      # model being tested, then this method will use that.  Otherwise, it will
+      # create a new instance to test against.
+      #
+      # Example:
+      #   should_allow_values_for :isbn, &quot;isbn 1 2345 6789 0&quot;, &quot;ISBN 1-2345-6789-0&quot;
+      #
+      def should_allow_values_for(attribute, *good_values)
+        get_options!(good_values)
+        klass = model_class
+        good_values.each do |v|
+          should &quot;allow #{attribute} to be set to #{v.inspect}&quot; do
+            assert_good_value(klass, attribute, v)
           end
         end
+      end
 
-        # Ensures that the length of the attribute is in the given range
-        #
-        # If an instance variable has been created in the setup named after the
-        # model being tested, then this method will use that.  Otherwise, it will
-        # create a new instance to test against.
-        #
-        # Options:
-        # * &lt;tt&gt;:short_message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.too_short') % range.first&lt;/tt&gt;
-        # * &lt;tt&gt;:long_message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.too_long') % range.last&lt;/tt&gt;
-        #
-        # Example:
-        #   should_ensure_length_in_range :password, (6..20)
-        #
-        def should_ensure_length_in_range(attribute, range, opts = {})
-          short_message, long_message = get_options!([opts], :short_message, :long_message)
-          short_message ||= default_error_message(:too_short, :count =&gt; range.first)
-          long_message  ||= default_error_message(:too_long, :count =&gt; range.last)
-
-          klass = model_class
-          min_length = range.first
-          max_length = range.last
-          same_length = (min_length == max_length)
-
-          if min_length &gt; 0
-            should &quot;not allow #{attribute} to be less than #{min_length} chars long&quot; do
-              min_value = &quot;x&quot; * (min_length - 1)
-              assert_bad_value(klass, attribute, min_value, short_message)
-            end
-          end
-
-          if min_length &gt; 0
-            should &quot;allow #{attribute} to be exactly #{min_length} chars long&quot; do
-              min_value = &quot;x&quot; * min_length
-              assert_good_value(klass, attribute, min_value, short_message)
-            end
+      # Ensures that the length of the attribute is in the given range
+      #
+      # If an instance variable has been created in the setup named after the
+      # model being tested, then this method will use that.  Otherwise, it will
+      # create a new instance to test against.
+      #
+      # Options:
+      # * &lt;tt&gt;:short_message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.too_short') % range.first&lt;/tt&gt;
+      # * &lt;tt&gt;:long_message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.too_long') % range.last&lt;/tt&gt;
+      #
+      # Example:
+      #   should_ensure_length_in_range :password, (6..20)
+      #
+      def should_ensure_length_in_range(attribute, range, opts = {})
+        short_message, long_message = get_options!([opts], :short_message, :long_message)
+        short_message ||= default_error_message(:too_short, :count =&gt; range.first)
+        long_message  ||= default_error_message(:too_long, :count =&gt; range.last)
+
+        klass = model_class
+        min_length = range.first
+        max_length = range.last
+        same_length = (min_length == max_length)
+
+        if min_length &gt; 0
+          should &quot;not allow #{attribute} to be less than #{min_length} chars long&quot; do
+            min_value = &quot;x&quot; * (min_length - 1)
+            assert_bad_value(klass, attribute, min_value, short_message)
           end
+        end
 
-          should &quot;not allow #{attribute} to be more than #{max_length} chars long&quot; do
-            max_value = &quot;x&quot; * (max_length + 1)
-            assert_bad_value(klass, attribute, max_value, long_message)
+        if min_length &gt; 0
+          should &quot;allow #{attribute} to be exactly #{min_length} chars long&quot; do
+            min_value = &quot;x&quot; * min_length
+            assert_good_value(klass, attribute, min_value, short_message)
           end
+        end
 
-          unless same_length
-            should &quot;allow #{attribute} to be exactly #{max_length} chars long&quot; do
-              max_value = &quot;x&quot; * max_length
-              assert_good_value(klass, attribute, max_value, long_message)
-            end
-          end
+        should &quot;not allow #{attribute} to be more than #{max_length} chars long&quot; do
+          max_value = &quot;x&quot; * (max_length + 1)
+          assert_bad_value(klass, attribute, max_value, long_message)
         end
 
-        # Ensures that the length of the attribute is at least a certain length
-        #
-        # If an instance variable has been created in the setup named after the
-        # model being tested, then this method will use that.  Otherwise, it will
-        # create a new instance to test against.
-        #
-        # Options:
-        # * &lt;tt&gt;:short_message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.too_short') % min_length&lt;/tt&gt;
-        #
-        # Example:
-        #   should_ensure_length_at_least :name, 3
-        #
-        def should_ensure_length_at_least(attribute, min_length, opts = {})
-          short_message = get_options!([opts], :short_message)
-          short_message ||= default_error_message(:too_short, :count =&gt; min_length)
-
-          klass = model_class
-
-          if min_length &gt; 0
-            min_value = &quot;x&quot; * (min_length - 1)
-            should &quot;not allow #{attribute} to be less than #{min_length} chars long&quot; do
-              assert_bad_value(klass, attribute, min_value, short_message)
-            end
-          end
-          should &quot;allow #{attribute} to be at least #{min_length} chars long&quot; do
-            valid_value = &quot;x&quot; * (min_length)
-            assert_good_value(klass, attribute, valid_value, short_message)
+        unless same_length
+          should &quot;allow #{attribute} to be exactly #{max_length} chars long&quot; do
+            max_value = &quot;x&quot; * max_length
+            assert_good_value(klass, attribute, max_value, long_message)
           end
         end
+      end
 
-        # Ensures that the length of the attribute is exactly a certain length
-        #
-        # If an instance variable has been created in the setup named after the
-        # model being tested, then this method will use that.  Otherwise, it will
-        # create a new instance to test against.
-        #
-        # Options:
-        # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.wrong_length') % length&lt;/tt&gt;
-        #
-        # Example:
-        #   should_ensure_length_is :ssn, 9
-        #
-        def should_ensure_length_is(attribute, length, opts = {})
-          message = get_options!([opts], :message)
-          message ||= default_error_message(:wrong_length, :count =&gt; length)
-
-          klass = model_class
-
-          should &quot;not allow #{attribute} to be less than #{length} chars long&quot; do
-            min_value = &quot;x&quot; * (length - 1)
-            assert_bad_value(klass, attribute, min_value, message)
-          end
+      # Ensures that the length of the attribute is at least a certain length
+      #
+      # If an instance variable has been created in the setup named after the
+      # model being tested, then this method will use that.  Otherwise, it will
+      # create a new instance to test against.
+      #
+      # Options:
+      # * &lt;tt&gt;:short_message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.too_short') % min_length&lt;/tt&gt;
+      #
+      # Example:
+      #   should_ensure_length_at_least :name, 3
+      #
+      def should_ensure_length_at_least(attribute, min_length, opts = {})
+        short_message = get_options!([opts], :short_message)
+        short_message ||= default_error_message(:too_short, :count =&gt; min_length)
 
-          should &quot;not allow #{attribute} to be greater than #{length} chars long&quot; do
-            max_value = &quot;x&quot; * (length + 1)
-            assert_bad_value(klass, attribute, max_value, message)
-          end
+        klass = model_class
 
-          should &quot;allow #{attribute} to be #{length} chars long&quot; do
-            valid_value = &quot;x&quot; * (length)
-            assert_good_value(klass, attribute, valid_value, message)
+        if min_length &gt; 0
+          min_value = &quot;x&quot; * (min_length - 1)
+          should &quot;not allow #{attribute} to be less than #{min_length} chars long&quot; do
+            assert_bad_value(klass, attribute, min_value, short_message)
           end
         end
+        should &quot;allow #{attribute} to be at least #{min_length} chars long&quot; do
+          valid_value = &quot;x&quot; * (min_length)
+          assert_good_value(klass, attribute, valid_value, short_message)
+        end
+      end
 
-        # Ensure that the attribute is in the range specified
-        #
-        # If an instance variable has been created in the setup named after the
-        # model being tested, then this method will use that.  Otherwise, it will
-        # create a new instance to test against.
-        #
-        # Options:
-        # * &lt;tt&gt;:low_message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.inclusion')&lt;/tt&gt;
-        # * &lt;tt&gt;:high_message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.inclusion')&lt;/tt&gt;
-        #
-        # Example:
-        #   should_ensure_value_in_range :age, (0..100)
-        #
-        def should_ensure_value_in_range(attribute, range, opts = {})
-          low_message, high_message = get_options!([opts], :low_message, :high_message)
-          low_message  ||= default_error_message(:inclusion)
-          high_message ||= default_error_message(:inclusion)
-
-          klass = model_class
-          min   = range.first
-          max   = range.last
-
-          should &quot;not allow #{attribute} to be less than #{min}&quot; do
-            v = min - 1
-            assert_bad_value(klass, attribute, v, low_message)
-          end
+      # Ensures that the length of the attribute is exactly a certain length
+      #
+      # If an instance variable has been created in the setup named after the
+      # model being tested, then this method will use that.  Otherwise, it will
+      # create a new instance to test against.
+      #
+      # Options:
+      # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.wrong_length') % length&lt;/tt&gt;
+      #
+      # Example:
+      #   should_ensure_length_is :ssn, 9
+      #
+      def should_ensure_length_is(attribute, length, opts = {})
+        message = get_options!([opts], :message)
+        message ||= default_error_message(:wrong_length, :count =&gt; length)
 
-          should &quot;allow #{attribute} to be #{min}&quot; do
-            v = min
-            assert_good_value(klass, attribute, v, low_message)
-          end
+        klass = model_class
 
-          should &quot;not allow #{attribute} to be more than #{max}&quot; do
-            v = max + 1
-            assert_bad_value(klass, attribute, v, high_message)
-          end
+        should &quot;not allow #{attribute} to be less than #{length} chars long&quot; do
+          min_value = &quot;x&quot; * (length - 1)
+          assert_bad_value(klass, attribute, min_value, message)
+        end
 
-          should &quot;allow #{attribute} to be #{max}&quot; do
-            v = max
-            assert_good_value(klass, attribute, v, high_message)
-          end
+        should &quot;not allow #{attribute} to be greater than #{length} chars long&quot; do
+          max_value = &quot;x&quot; * (length + 1)
+          assert_bad_value(klass, attribute, max_value, message)
         end
 
-        # Ensure that the attribute is numeric
-        #
-        # If an instance variable has been created in the setup named after the
-        # model being tested, then this method will use that.  Otherwise, it will
-        # create a new instance to test against.
-        #
-        # Options:
-        # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.not_a_number')&lt;/tt&gt;
-        #
-        # Example:
-        #   should_only_allow_numeric_values_for :age
-        #
-        def should_only_allow_numeric_values_for(*attributes)
-          message = get_options!(attributes, :message)
-          message ||= default_error_message(:not_a_number)
-          klass = model_class
-          attributes.each do |attribute|
-            attribute = attribute.to_sym
-            should &quot;only allow numeric values for #{attribute}&quot; do
-              assert_bad_value(klass, attribute, &quot;abcd&quot;, message)
-            end
-          end
+        should &quot;allow #{attribute} to be #{length} chars long&quot; do
+          valid_value = &quot;x&quot; * (length)
+          assert_good_value(klass, attribute, valid_value, message)
         end
+      end
 
-        # Ensures that the has_many relationship exists.  Will also test that the
-        # associated table has the required columns.  Works with polymorphic
-        # associations.
-        #
-        # 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, 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;
-              assert_equal :has_many, reflection.macro
-
-              if through
-                through_reflection = klass.reflect_on_association(through)
-                assert through_reflection, &quot;#{klass.name} does not have any relationship to #{through}&quot;
-                assert_equal(through, reflection.options[:through])
-              end
+      # Ensure that the attribute is in the range specified
+      #
+      # If an instance variable has been created in the setup named after the
+      # model being tested, then this method will use that.  Otherwise, it will
+      # create a new instance to test against.
+      #
+      # Options:
+      # * &lt;tt&gt;:low_message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.inclusion')&lt;/tt&gt;
+      # * &lt;tt&gt;:high_message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.inclusion')&lt;/tt&gt;
+      #
+      # Example:
+      #   should_ensure_value_in_range :age, (0..100)
+      #
+      def should_ensure_value_in_range(attribute, range, opts = {})
+        low_message, high_message = get_options!([opts], :low_message, :high_message)
+        low_message  ||= default_error_message(:inclusion)
+        high_message ||= default_error_message(:inclusion)
+
+        klass = model_class
+        min   = range.first
+        max   = range.last
+
+        should &quot;not allow #{attribute} to be less than #{min}&quot; do
+          v = min - 1
+          assert_bad_value(klass, attribute, v, low_message)
+        end
 
-              if dependent
-                assert_equal dependent.to_s,
-                             reflection.options[:dependent].to_s,
-                             &quot;#{association} should have #{dependent} dependency&quot;
-              end
+        should &quot;allow #{attribute} to be #{min}&quot; do
+          v = min
+          assert_good_value(klass, attribute, v, low_message)
+        end
 
-              # Check for the existence of the foreign key on the other table
-              unless reflection.options[:through]
-                if reflection.options[:foreign_key]
-                  fk = reflection.options[:foreign_key]
-                elsif reflection.options[:as]
-                  fk = reflection.options[:as].to_s.foreign_key
-                else
-                  fk = reflection.primary_key_name
-                end
-
-                associated_klass_name = (reflection.options[:class_name] || association.to_s.classify)
-                associated_klass = associated_klass_name.constantize
-
-                assert associated_klass.column_names.include?(fk.to_s),
-                       &quot;#{associated_klass.name} does not have a #{fk} foreign key.&quot;
-              end
-            end
+        should &quot;not allow #{attribute} to be more than #{max}&quot; do
+          v = max + 1
+          assert_bad_value(klass, attribute, v, high_message)
+        end
+
+        should &quot;allow #{attribute} to be #{max}&quot; do
+          v = max
+          assert_good_value(klass, attribute, v, high_message)
+        end
+      end
+
+      # Ensure that the attribute is numeric
+      #
+      # If an instance variable has been created in the setup named after the
+      # model being tested, then this method will use that.  Otherwise, it will
+      # create a new instance to test against.
+      #
+      # Options:
+      # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.not_a_number')&lt;/tt&gt;
+      #
+      # Example:
+      #   should_only_allow_numeric_values_for :age
+      #
+      def should_only_allow_numeric_values_for(*attributes)
+        message = get_options!(attributes, :message)
+        message ||= default_error_message(:not_a_number)
+        klass = model_class
+        attributes.each do |attribute|
+          attribute = attribute.to_sym
+          should &quot;only allow numeric values for #{attribute}&quot; do
+            assert_bad_value(klass, attribute, &quot;abcd&quot;, message)
           end
         end
+      end
 
-        # Ensure that the has_one relationship exists.  Will also test that the
-        # associated table has the required columns.  Works with polymorphic
-        # associations.
-        #
-        # Options:
-        # * &lt;tt&gt;:dependent&lt;/tt&gt; - tests that the association makes use of the dependent option.
-        #
-        # Example:
-        #   should_have_one :god # unless hindu
-        #
-        def should_have_one(*associations)
-          dependent = get_options!(associations, :dependent)
-          klass = model_class
-          associations.each do |association|
-            name = &quot;have one #{association}&quot;
-            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;
-              assert_equal :has_one, reflection.macro
+      # Ensures that the has_many relationship exists.  Will also test that the
+      # associated table has the required columns.  Works with polymorphic
+      # associations.
+      #
+      # 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, 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;
+            assert_equal :has_many, reflection.macro
+
+            if through
+              through_reflection = klass.reflect_on_association(through)
+              assert through_reflection, &quot;#{klass.name} does not have any relationship to #{through}&quot;
+              assert_equal(through, reflection.options[:through])
+            end
 
-              associated_klass = (reflection.options[:class_name] || association.to_s.camelize).constantize
+            if dependent
+              assert_equal dependent.to_s,
+                           reflection.options[:dependent].to_s,
+                           &quot;#{association} should have #{dependent} dependency&quot;
+            end
 
+            # Check for the existence of the foreign key on the other table
+            unless reflection.options[:through]
               if reflection.options[:foreign_key]
                 fk = reflection.options[:foreign_key]
               elsif reflection.options[:as]
                 fk = reflection.options[:as].to_s.foreign_key
-                fk_type = fk.gsub(/_id$/, '_type')
-                assert associated_klass.column_names.include?(fk_type),
-                       &quot;#{associated_klass.name} does not have a #{fk_type} column.&quot;
               else
-                fk = klass.name.foreign_key
+                fk = reflection.primary_key_name
               end
+
+              associated_klass_name = (reflection.options[:class_name] || association.to_s.classify)
+              associated_klass = associated_klass_name.constantize
+
               assert associated_klass.column_names.include?(fk.to_s),
                      &quot;#{associated_klass.name} does not have a #{fk} foreign key.&quot;
-
-              if dependent
-                assert_equal dependent.to_s,
-                             reflection.options[:dependent].to_s,
-                             &quot;#{association} should have #{dependent} dependency&quot;
-              end
             end
           end
         end
+      end
+
+      # Ensure that the has_one relationship exists.  Will also test that the
+      # associated table has the required columns.  Works with polymorphic
+      # associations.
+      #
+      # Options:
+      # * &lt;tt&gt;:dependent&lt;/tt&gt; - tests that the association makes use of the dependent option.
+      #
+      # Example:
+      #   should_have_one :god # unless hindu
+      #
+      def should_have_one(*associations)
+        dependent = get_options!(associations, :dependent)
+        klass = model_class
+        associations.each do |association|
+          name = &quot;have one #{association}&quot;
+          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;
+            assert_equal :has_one, reflection.macro
+
+            associated_klass = (reflection.options[:class_name] || association.to_s.camelize).constantize
+
+            if reflection.options[:foreign_key]
+              fk = reflection.options[:foreign_key]
+            elsif reflection.options[:as]
+              fk = reflection.options[:as].to_s.foreign_key
+              fk_type = fk.gsub(/_id$/, '_type')
+              assert associated_klass.column_names.include?(fk_type),
+                     &quot;#{associated_klass.name} does not have a #{fk_type} column.&quot;
+            else
+              fk = klass.name.foreign_key
+            end
+            assert associated_klass.column_names.include?(fk.to_s),
+                   &quot;#{associated_klass.name} does not have a #{fk} foreign key.&quot;
 
-        # Ensures that the has_and_belongs_to_many relationship exists, and that the join
-        # table is in place.
-        #
-        #   should_have_and_belong_to_many :posts, :cars
-        #
-        def should_have_and_belong_to_many(*associations)
-          get_options!(associations)
-          klass = model_class
-
-          associations.each do |association|
-            should &quot;should have and belong to many #{association}&quot; do
-              reflection = klass.reflect_on_association(association)
-              assert reflection, &quot;#{klass.name} does not have any relationship to #{association}&quot;
-              assert_equal :has_and_belongs_to_many, reflection.macro
-              table = reflection.options[:join_table]
-              assert ::ActiveRecord::Base.connection.tables.include?(table.to_s), &quot;table #{table} doesn't exist&quot;
+            if dependent
+              assert_equal dependent.to_s,
+                           reflection.options[:dependent].to_s,
+                           &quot;#{association} should have #{dependent} dependency&quot;
             end
           end
         end
+      end
 
-        # Ensure that the belongs_to relationship exists.
-        #
-        #   should_belong_to :parent
-        #
-        def should_belong_to(*associations)
-          get_options!(associations)
-          klass = model_class
-          associations.each do |association|
-            should &quot;belong_to #{association}&quot; do
-              reflection = klass.reflect_on_association(association)
-              assert reflection, &quot;#{klass.name} does not have any relationship to #{association}&quot;
-              assert_equal :belongs_to, reflection.macro
-
-              unless reflection.options[:polymorphic]
-                associated_klass = (reflection.options[:class_name] || association.to_s.camelize).constantize
-                fk = reflection.options[:foreign_key] || reflection.primary_key_name
-                assert klass.column_names.include?(fk.to_s), &quot;#{klass.name} does not have a #{fk} foreign key.&quot;
-              end
-            end
+      # Ensures that the has_and_belongs_to_many relationship exists, and that the join
+      # table is in place.
+      #
+      #   should_have_and_belong_to_many :posts, :cars
+      #
+      def should_have_and_belong_to_many(*associations)
+        get_options!(associations)
+        klass = model_class
+
+        associations.each do |association|
+          should &quot;should have and belong to many #{association}&quot; do
+            reflection = klass.reflect_on_association(association)
+            assert reflection, &quot;#{klass.name} does not have any relationship to #{association}&quot;
+            assert_equal :has_and_belongs_to_many, reflection.macro
+            table = reflection.options[:join_table]
+            assert ::ActiveRecord::Base.connection.tables.include?(table.to_s), &quot;table #{table} doesn't exist&quot;
           end
         end
+      end
 
-        # Ensure that the given class methods are defined on the model.
-        #
-        #   should_have_class_methods :find, :destroy
-        #
-        def should_have_class_methods(*methods)
-          get_options!(methods)
-          klass = model_class
-          methods.each do |method|
-            should &quot;respond to class method ##{method}&quot; do
-              assert_respond_to klass, method, &quot;#{klass.name} does not have class method #{method}&quot;
+      # Ensure that the belongs_to relationship exists.
+      #
+      #   should_belong_to :parent
+      #
+      def should_belong_to(*associations)
+        get_options!(associations)
+        klass = model_class
+        associations.each do |association|
+          should &quot;belong_to #{association}&quot; do
+            reflection = klass.reflect_on_association(association)
+            assert reflection, &quot;#{klass.name} does not have any relationship to #{association}&quot;
+            assert_equal :belongs_to, reflection.macro
+
+            unless reflection.options[:polymorphic]
+              associated_klass = (reflection.options[:class_name] || association.to_s.camelize).constantize
+              fk = reflection.options[:foreign_key] || reflection.primary_key_name
+              assert klass.column_names.include?(fk.to_s), &quot;#{klass.name} does not have a #{fk} foreign key.&quot;
             end
           end
         end
+      end
 
-        # Ensure that the given instance methods are defined on the model.
-        #
-        #   should_have_instance_methods :email, :name, :name=
-        #
-        def should_have_instance_methods(*methods)
-          get_options!(methods)
-          klass = model_class
-          methods.each do |method|
-            should &quot;respond to instance method ##{method}&quot; do
-              assert_respond_to klass.new, method, &quot;#{klass.name} does not have instance method #{method}&quot;
-            end
+      # Ensure that the given class methods are defined on the model.
+      #
+      #   should_have_class_methods :find, :destroy
+      #
+      def should_have_class_methods(*methods)
+        get_options!(methods)
+        klass = model_class
+        methods.each do |method|
+          should &quot;respond to class method ##{method}&quot; do
+            assert_respond_to klass, method, &quot;#{klass.name} does not have class method #{method}&quot;
           end
         end
+      end
 
-        # Ensure that the given columns are defined on the models backing SQL table.
-        #
-        #   should_have_db_columns :id, :email, :name, :created_at
-        #
-        def should_have_db_columns(*columns)
-          column_type = get_options!(columns, :type)
-          klass = model_class
-          columns.each do |name|
-            test_name = &quot;have column #{name}&quot;
-            test_name += &quot; of type #{column_type}&quot; if column_type
-            should test_name do
-              column = klass.columns.detect {|c| c.name == name.to_s }
-              assert column, &quot;#{klass.name} does not have column #{name}&quot;
-            end
+      # Ensure that the given instance methods are defined on the model.
+      #
+      #   should_have_instance_methods :email, :name, :name=
+      #
+      def should_have_instance_methods(*methods)
+        get_options!(methods)
+        klass = model_class
+        methods.each do |method|
+          should &quot;respond to instance method ##{method}&quot; do
+            assert_respond_to klass.new, method, &quot;#{klass.name} does not have instance method #{method}&quot;
           end
         end
+      end
 
-        # Ensure that the given column is defined on the models backing SQL table.  The options are the same as
-        # the instance variables defined on the column definition:  :precision, :limit, :default, :null,
-        # :primary, :type, :scale, and :sql_type.
-        #
-        #   should_have_db_column :email, :type =&gt; &quot;string&quot;, :default =&gt; nil,   :precision =&gt; nil, :limit    =&gt; 255,
-        #                                 :null =&gt; true,     :primary =&gt; false, :scale     =&gt; nil, :sql_type =&gt; 'varchar(255)'
-        #
-        def should_have_db_column(name, opts = {})
-          klass = model_class
-          test_name = &quot;have column named :#{name}&quot;
-          test_name += &quot; with options &quot; + opts.inspect unless opts.empty?
+      # Ensure that the given columns are defined on the models backing SQL table.
+      #
+      #   should_have_db_columns :id, :email, :name, :created_at
+      #
+      def should_have_db_columns(*columns)
+        column_type = get_options!(columns, :type)
+        klass = model_class
+        columns.each do |name|
+          test_name = &quot;have column #{name}&quot;
+          test_name += &quot; of type #{column_type}&quot; if column_type
           should test_name do
             column = klass.columns.detect {|c| c.name == name.to_s }
             assert column, &quot;#{klass.name} does not have column #{name}&quot;
-            opts.each do |k, v|
-              assert_equal column.instance_variable_get(&quot;@#{k}&quot;).to_s, v.to_s, &quot;:#{name} column on table for #{klass} does not match option :#{k}&quot;
-            end
           end
         end
+      end
 
-        # Ensures that there are DB indices on the given columns or tuples of columns.
-        # Also aliased to should_have_index for readability
-        #
-        #   should_have_indices :email, :name, [:commentable_type, :commentable_id]
-        #   should_have_index :age
-        #
-        def should_have_indices(*columns)
-          table = model_class.table_name
-          indices = ::ActiveRecord::Base.connection.indexes(table).map(&amp;:columns)
-
-          columns.each do |column|
-            should &quot;have index on #{table} for #{column.inspect}&quot; do
-              columns = [column].flatten.map(&amp;:to_s)
-              assert_contains(indices, columns)
-            end
+      # Ensure that the given column is defined on the models backing SQL table.  The options are the same as
+      # the instance variables defined on the column definition:  :precision, :limit, :default, :null,
+      # :primary, :type, :scale, and :sql_type.
+      #
+      #   should_have_db_column :email, :type =&gt; &quot;string&quot;, :default =&gt; nil,   :precision =&gt; nil, :limit    =&gt; 255,
+      #                                 :null =&gt; true,     :primary =&gt; false, :scale     =&gt; nil, :sql_type =&gt; 'varchar(255)'
+      #
+      def should_have_db_column(name, opts = {})
+        klass = model_class
+        test_name = &quot;have column named :#{name}&quot;
+        test_name += &quot; with options &quot; + opts.inspect unless opts.empty?
+        should test_name do
+          column = klass.columns.detect {|c| c.name == name.to_s }
+          assert column, &quot;#{klass.name} does not have column #{name}&quot;
+          opts.each do |k, v|
+            assert_equal column.instance_variable_get(&quot;@#{k}&quot;).to_s, v.to_s, &quot;:#{name} column on table for #{klass} does not match option :#{k}&quot;
           end
         end
+      end
 
-        alias_method :should_have_index, :should_have_indices
-
-        # Ensures that the model cannot be saved if one of the attributes listed is not accepted.
-        #
-        # If an instance variable has been created in the setup named after the
-        # model being tested, then this method will use that.  Otherwise, it will
-        # create a new instance to test against.
-        #
-        # Options:
-        # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
-        #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.accepted')&lt;/tt&gt;
-        #
-        # Example:
-        #   should_require_acceptance_of :eula
-        #
-        def should_require_acceptance_of(*attributes)
-          message = get_options!(attributes, :message)
-          message ||= default_error_message(:accepted)
-          klass = model_class
-
-          attributes.each do |attribute|
-            should &quot;require #{attribute} to be accepted&quot; do
-              assert_bad_value(klass, attribute, false, message)
-            end
+      # Ensures that there are DB indices on the given columns or tuples of columns.
+      # Also aliased to should_have_index for readability
+      #
+      #   should_have_indices :email, :name, [:commentable_type, :commentable_id]
+      #   should_have_index :age
+      #
+      def should_have_indices(*columns)
+        table = model_class.table_name
+        indices = ::ActiveRecord::Base.connection.indexes(table).map(&amp;:columns)
+
+        columns.each do |column|
+          should &quot;have index on #{table} for #{column.inspect}&quot; do
+            columns = [column].flatten.map(&amp;:to_s)
+            assert_contains(indices, columns)
           end
         end
+      end
 
-        # Ensures that the model has a method named scope_name that returns a NamedScope object with the
-        # proxy options set to the options you supply.  scope_name can be either a symbol, or a method
-        # call which will be evaled against the model.  The eval'd method call has access to all the same
-        # instance variables that a should statement would.
-        #
-        # Options: Any of the options that the named scope would pass on to find.
-        #
-        # Example:
-        #
-        #   should_have_named_scope :visible, :conditions =&gt; {:visible =&gt; true}
-        #
-        # Passes for
-        #
-        #   named_scope :visible, :conditions =&gt; {:visible =&gt; true}
-        #
-        # Or for
-        #
-        #   def self.visible
-        #     scoped(:conditions =&gt; {:visible =&gt; true})
-        #   end
-        #
-        # You can test lambdas or methods that return ActiveRecord#scoped calls:
-        #
-        #   should_have_named_scope 'recent(5)', :limit =&gt; 5
-        #   should_have_named_scope 'recent(1)', :limit =&gt; 1
-        #
-        # Passes for
-        #   named_scope :recent, lambda {|c| {:limit =&gt; c}}
-        #
-        # Or for
-        #
-        #   def self.recent(c)
-        #     scoped(:limit =&gt; c)
-        #   end
-        #
-        def should_have_named_scope(scope_call, *args)
-          klass = model_class
-          scope_opts = args.extract_options!
-          scope_call = scope_call.to_s
-
-          context scope_call do
-            setup do
-              @scope = eval(&quot;#{klass}.#{scope_call}&quot;)
-            end
+      alias_method :should_have_index, :should_have_indices
 
-            should &quot;return a scope object&quot; do
-              assert_equal ::ActiveRecord::NamedScope::Scope, @scope.class
-            end
+      # Ensures that the model cannot be saved if one of the attributes listed is not accepted.
+      #
+      # If an instance variable has been created in the setup named after the
+      # model being tested, then this method will use that.  Otherwise, it will
+      # create a new instance to test against.
+      #
+      # Options:
+      # * &lt;tt&gt;:message&lt;/tt&gt; - value the test expects to find in &lt;tt&gt;errors.on(:attribute)&lt;/tt&gt;.
+      #   Regexp or string.  Default = &lt;tt&gt;I18n.translate('activerecord.errors.messages.accepted')&lt;/tt&gt;
+      #
+      # Example:
+      #   should_require_acceptance_of :eula
+      #
+      def should_require_acceptance_of(*attributes)
+        message = get_options!(attributes, :message)
+        message ||= default_error_message(:accepted)
+        klass = model_class
 
-            unless scope_opts.empty?
-              should &quot;scope itself to #{scope_opts.inspect}&quot; do
-                assert_equal scope_opts, @scope.proxy_options
-              end
+        attributes.each do |attribute|
+          should &quot;require #{attribute} to be accepted&quot; do
+            assert_bad_value(klass, attribute, false, message)
+          end
+        end
+      end
+
+      # Ensures that the model has a method named scope_name that returns a NamedScope object with the
+      # proxy options set to the options you supply.  scope_name can be either a symbol, or a method
+      # call which will be evaled against the model.  The eval'd method call has access to all the same
+      # instance variables that a should statement would.
+      #
+      # Options: Any of the options that the named scope would pass on to find.
+      #
+      # Example:
+      #
+      #   should_have_named_scope :visible, :conditions =&gt; {:visible =&gt; true}
+      #
+      # Passes for
+      #
+      #   named_scope :visible, :conditions =&gt; {:visible =&gt; true}
+      #
+      # Or for
+      #
+      #   def self.visible
+      #     scoped(:conditions =&gt; {:visible =&gt; true})
+      #   end
+      #
+      # You can test lambdas or methods that return ActiveRecord#scoped calls:
+      #
+      #   should_have_named_scope 'recent(5)', :limit =&gt; 5
+      #   should_have_named_scope 'recent(1)', :limit =&gt; 1
+      #
+      # Passes for
+      #   named_scope :recent, lambda {|c| {:limit =&gt; c}}
+      #
+      # Or for
+      #
+      #   def self.recent(c)
+      #     scoped(:limit =&gt; c)
+      #   end
+      #
+      def should_have_named_scope(scope_call, *args)
+        klass = model_class
+        scope_opts = args.extract_options!
+        scope_call = scope_call.to_s
+
+        context scope_call do
+          setup do
+            @scope = eval(&quot;#{klass}.#{scope_call}&quot;)
+          end
+
+          should &quot;return a scope object&quot; do
+            assert_equal ::ActiveRecord::NamedScope::Scope, @scope.class
+          end
+
+          unless scope_opts.empty?
+            should &quot;scope itself to #{scope_opts.inspect}&quot; do
+              assert_equal scope_opts, @scope.proxy_options
             end
           end
         end</diff>
      <filename>lib/shoulda/active_record/macros.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,48 +1,46 @@
-module ThoughtBot # :nodoc:
-  module Shoulda # :nodoc:
-    module Assertions
-      # Asserts that two arrays contain the same elements, the same number of times.  Essentially ==, but unordered.
-      #
-      #   assert_same_elements([:a, :b, :c], [:c, :a, :b]) =&gt; passes
-      def assert_same_elements(a1, a2, msg = nil)
-        [:select, :inject, :size].each do |m|
-          [a1, a2].each {|a| assert_respond_to(a, m, &quot;Are you sure that #{a.inspect} is an array?  It doesn't respond to #{m}.&quot;) }
-        end
+module Shoulda # :nodoc:
+  module Assertions
+    # Asserts that two arrays contain the same elements, the same number of times.  Essentially ==, but unordered.
+    #
+    #   assert_same_elements([:a, :b, :c], [:c, :a, :b]) =&gt; passes
+    def assert_same_elements(a1, a2, msg = nil)
+      [:select, :inject, :size].each do |m|
+        [a1, a2].each {|a| assert_respond_to(a, m, &quot;Are you sure that #{a.inspect} is an array?  It doesn't respond to #{m}.&quot;) }
+      end
 
-        assert a1h = a1.inject({}) { |h,e| h[e] = a1.select { |i| i == e }.size; h }
-        assert a2h = a2.inject({}) { |h,e| h[e] = a2.select { |i| i == e }.size; h }
+      assert a1h = a1.inject({}) { |h,e| h[e] = a1.select { |i| i == e }.size; h }
+      assert a2h = a2.inject({}) { |h,e| h[e] = a2.select { |i| i == e }.size; h }
 
-        assert_equal(a1h, a2h, msg)
-      end
+      assert_equal(a1h, a2h, msg)
+    end
 
-      # Asserts that the given collection contains item x.  If x is a regular expression, ensure that
-      # at least one element from the collection matches x.  +extra_msg+ is appended to the error message if the assertion fails.
-      #
-      #   assert_contains(['a', '1'], /\d/) =&gt; passes
-      #   assert_contains(['a', '1'], 'a') =&gt; passes
-      #   assert_contains(['a', '1'], /not there/) =&gt; fails
-      def assert_contains(collection, x, extra_msg = &quot;&quot;)
-        collection = [collection] unless collection.is_a?(Array)
-        msg = &quot;#{x.inspect} not found in #{collection.to_a.inspect} #{extra_msg}&quot;
-        case x
-        when Regexp
-          assert(collection.detect { |e| e =~ x }, msg)
-        else         
-          assert(collection.include?(x), msg)
-        end
+    # Asserts that the given collection contains item x.  If x is a regular expression, ensure that
+    # at least one element from the collection matches x.  +extra_msg+ is appended to the error message if the assertion fails.
+    #
+    #   assert_contains(['a', '1'], /\d/) =&gt; passes
+    #   assert_contains(['a', '1'], 'a') =&gt; passes
+    #   assert_contains(['a', '1'], /not there/) =&gt; fails
+    def assert_contains(collection, x, extra_msg = &quot;&quot;)
+      collection = [collection] unless collection.is_a?(Array)
+      msg = &quot;#{x.inspect} not found in #{collection.to_a.inspect} #{extra_msg}&quot;
+      case x
+      when Regexp
+        assert(collection.detect { |e| e =~ x }, msg)
+      else         
+        assert(collection.include?(x), msg)
       end
+    end
 
-      # Asserts that the given collection does not contain item x.  If x is a regular expression, ensure that
-      # none of the elements from the collection match x.
-      def assert_does_not_contain(collection, x, extra_msg = &quot;&quot;)
-        collection = [collection] unless collection.is_a?(Array)
-        msg = &quot;#{x.inspect} found in #{collection.to_a.inspect} &quot; + extra_msg
-        case x
-        when Regexp
-          assert(!collection.detect { |e| e =~ x }, msg)
-        else         
-          assert(!collection.include?(x), msg)
-        end
+    # Asserts that the given collection does not contain item x.  If x is a regular expression, ensure that
+    # none of the elements from the collection match x.
+    def assert_does_not_contain(collection, x, extra_msg = &quot;&quot;)
+      collection = [collection] unless collection.is_a?(Array)
+      msg = &quot;#{x.inspect} found in #{collection.to_a.inspect} &quot; + extra_msg
+      case x
+      when Regexp
+        assert(!collection.detect { |e| e =~ x }, msg)
+      else         
+        assert(!collection.include?(x), msg)
       end
     end
   end</diff>
      <filename>lib/shoulda/assertions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,306 +1,304 @@
-module Thoughtbot # :nodoc:
-  module Shoulda
-    VERSION = '2.0.6'
-
-    class &lt;&lt; self
-      attr_accessor :contexts
-      def contexts # :nodoc:
-        @contexts ||= []
-      end
-
-      def current_context # :nodoc:
-        self.contexts.last
-      end
-
-      def add_context(context) # :nodoc:
-        self.contexts.push(context)
-      end
+module Shoulda
+  VERSION = '2.0.6'
 
-      def remove_context # :nodoc:
-        self.contexts.pop
-      end
+  class &lt;&lt; self
+    attr_accessor :contexts
+    def contexts # :nodoc:
+      @contexts ||= []
     end
 
-    # == Should statements
-    #
-    # Should statements are just syntactic sugar over normal Test::Unit test methods.  A should block
-    # contains all the normal code and assertions you're used to seeing, with the added benefit that
-    # they can be wrapped inside context blocks (see below).
-    #
-    # === Example:
-    #
-    #  class UserTest &lt;&lt; Test::Unit::TestCase
-    #
-    #    def setup
-    #      @user = User.new(&quot;John&quot;, &quot;Doe&quot;)
-    #    end
-    #
-    #    should &quot;return its full name&quot;
-    #      assert_equal 'John Doe', @user.full_name
-    #    end
-    #
-    #  end
-    #
-    # ...will produce the following test:
-    # * &lt;tt&gt;&quot;test: User should return its full name. &quot;&lt;/tt&gt;
-    #
-    # Note: The part before &lt;tt&gt;should&lt;/tt&gt; in the test name is gleamed from the name of the Test::Unit class.
-    #
-    # Should statements can also take a Proc as a &lt;tt&gt;:before &lt;/tt&gt;option.  This proc runs after any
-    # parent context's setups but before the current context's setup.
-    #
-    # === Example:
-    #
-    #  context &quot;Some context&quot; do
-    #    setup { puts(&quot;I run after the :before proc&quot;) }
-    #
-    #    should &quot;run a :before proc&quot;, :before =&gt; lambda { puts(&quot;I run before the setup&quot;) }  do
-    #      assert true
-    #    end
-    #  end
+    def current_context # :nodoc:
+      self.contexts.last
+    end
 
-    def should(name, options = {}, &amp;blk)
-      if Shoulda.current_context
-        block_given? ? Shoulda.current_context.should(name, options, &amp;blk) : Should.current_context.should_eventually(name)
-      else
-        context_name = self.name.gsub(/Test/, &quot;&quot;)
-        context = Thoughtbot::Shoulda::Context.new(context_name, self) do
-          block_given? ? should(name, options, &amp;blk) : should_eventually(name)
-        end
-        context.build
-      end
+    def add_context(context) # :nodoc:
+      self.contexts.push(context)
     end
 
-    # == Before statements
-    #
-    # Before statements are should statements that run before the current
-    # context's setup. These are especially useful when setting expectations.
-    #
-    # === Example:
-    #
-    #  class UserControllerTest &lt; Test::Unit::TestCase
-    #    context &quot;the index action&quot; do
-    #      setup do
-    #        @users = [Factory(:user)]
-    #        User.stubs(:find).returns(@users)
-    #      end
-    #
-    #      context &quot;on GET&quot; do
-    #        setup { get :index }
-    #
-    #        should_respond_with :success
-    #
-    #        # runs before &quot;get :index&quot;
-    #        before_should &quot;find all users&quot; do
-    #          User.expects(:find).with(:all).returns(@users)
-    #        end
-    #      end
-    #    end
-    #  end
-    def before_should(name, &amp;blk)
-      should(name, :before =&gt; blk) { assert true }
+    def remove_context # :nodoc:
+      self.contexts.pop
     end
+  end
 
-    # Just like should, but never runs, and instead prints an 'X' in the Test::Unit output.
-    def should_eventually(name, options = {}, &amp;blk)
+  # == Should statements
+  #
+  # Should statements are just syntactic sugar over normal Test::Unit test methods.  A should block
+  # contains all the normal code and assertions you're used to seeing, with the added benefit that
+  # they can be wrapped inside context blocks (see below).
+  #
+  # === Example:
+  #
+  #  class UserTest &lt;&lt; Test::Unit::TestCase
+  #
+  #    def setup
+  #      @user = User.new(&quot;John&quot;, &quot;Doe&quot;)
+  #    end
+  #
+  #    should &quot;return its full name&quot;
+  #      assert_equal 'John Doe', @user.full_name
+  #    end
+  #
+  #  end
+  #
+  # ...will produce the following test:
+  # * &lt;tt&gt;&quot;test: User should return its full name. &quot;&lt;/tt&gt;
+  #
+  # Note: The part before &lt;tt&gt;should&lt;/tt&gt; in the test name is gleamed from the name of the Test::Unit class.
+  #
+  # Should statements can also take a Proc as a &lt;tt&gt;:before &lt;/tt&gt;option.  This proc runs after any
+  # parent context's setups but before the current context's setup.
+  #
+  # === Example:
+  #
+  #  context &quot;Some context&quot; do
+  #    setup { puts(&quot;I run after the :before proc&quot;) }
+  #
+  #    should &quot;run a :before proc&quot;, :before =&gt; lambda { puts(&quot;I run before the setup&quot;) }  do
+  #      assert true
+  #    end
+  #  end
+
+  def should(name, options = {}, &amp;blk)
+    if Shoulda.current_context
+      block_given? ? Shoulda.current_context.should(name, options, &amp;blk) : Should.current_context.should_eventually(name)
+    else
       context_name = self.name.gsub(/Test/, &quot;&quot;)
-      context = Thoughtbot::Shoulda::Context.new(context_name, self) do
-        should_eventually(name, &amp;blk)
+      context = Shoulda::Context.new(context_name, self) do
+        block_given? ? should(name, options, &amp;blk) : should_eventually(name)
       end
       context.build
     end
+  end
 
-    # == Contexts
-    #
-    # A context block groups should statements under a common set of setup/teardown methods.
-    # Context blocks can be arbitrarily nested, and can do wonders for improving the maintainability
-    # and readability of your test code.
-    #
-    # A context block can contain setup, should, should_eventually, and teardown blocks.
-    #
-    #  class UserTest &lt;&lt; Test::Unit::TestCase
-    #    context &quot;A User instance&quot; do
-    #      setup do
-    #        @user = User.find(:first)
-    #      end
-    #
-    #      should &quot;return its full name&quot;
-    #        assert_equal 'John Doe', @user.full_name
-    #      end
-    #    end
-    #  end
-    #
-    # This code will produce the method &lt;tt&gt;&quot;test: A User instance should return its full name. &quot;&lt;/tt&gt;.
-    #
-    # Contexts may be nested.  Nested contexts run their setup blocks from out to in before each
-    # should statement.  They then run their teardown blocks from in to out after each should statement.
-    #
-    #  class UserTest &lt;&lt; Test::Unit::TestCase
-    #    context &quot;A User instance&quot; do
-    #      setup do
-    #        @user = User.find(:first)
-    #      end
-    #
-    #      should &quot;return its full name&quot;
-    #        assert_equal 'John Doe', @user.full_name
-    #      end
-    #
-    #      context &quot;with a profile&quot; do
-    #        setup do
-    #          @user.profile = Profile.find(:first)
-    #        end
-    #
-    #        should &quot;return true when sent :has_profile?&quot;
-    #          assert @user.has_profile?
-    #        end
-    #      end
-    #    end
-    #  end
-    #
-    # This code will produce the following methods
-    # * &lt;tt&gt;&quot;test: A User instance should return its full name. &quot;&lt;/tt&gt;
-    # * &lt;tt&gt;&quot;test: A User instance with a profile should return true when sent :has_profile?. &quot;&lt;/tt&gt;
-    #
-    # &lt;b&gt;Just like should statements, a context block can exist next to normal &lt;tt&gt;def test_the_old_way; end&lt;/tt&gt;
-    # tests&lt;/b&gt;.  This means you do not have to fully commit to the context/should syntax in a test file.
+  # == Before statements
+  #
+  # Before statements are should statements that run before the current
+  # context's setup. These are especially useful when setting expectations.
+  #
+  # === Example:
+  #
+  #  class UserControllerTest &lt; Test::Unit::TestCase
+  #    context &quot;the index action&quot; do
+  #      setup do
+  #        @users = [Factory(:user)]
+  #        User.stubs(:find).returns(@users)
+  #      end
+  #
+  #      context &quot;on GET&quot; do
+  #        setup { get :index }
+  #
+  #        should_respond_with :success
+  #
+  #        # runs before &quot;get :index&quot;
+  #        before_should &quot;find all users&quot; do
+  #          User.expects(:find).with(:all).returns(@users)
+  #        end
+  #      end
+  #    end
+  #  end
+  def before_should(name, &amp;blk)
+    should(name, :before =&gt; blk) { assert true }
+  end
 
-    def context(name, &amp;blk)
-      if Shoulda.current_context
-        Shoulda.current_context.context(name, &amp;blk)
-      else
-        context = Thoughtbot::Shoulda::Context.new(name, self, &amp;blk)
-        context.build
-      end
+  # Just like should, but never runs, and instead prints an 'X' in the Test::Unit output.
+  def should_eventually(name, options = {}, &amp;blk)
+    context_name = self.name.gsub(/Test/, &quot;&quot;)
+    context = Shoulda::Context.new(context_name, self) do
+      should_eventually(name, &amp;blk)
     end
+    context.build
+  end
 
-    class Context # :nodoc:
-
-      attr_accessor :name               # my name
-      attr_accessor :parent             # may be another context, or the original test::unit class.
-      attr_accessor :subcontexts        # array of contexts nested under myself
-      attr_accessor :setup_blocks       # blocks given via setup methods
-      attr_accessor :teardown_blocks    # blocks given via teardown methods
-      attr_accessor :shoulds            # array of hashes representing the should statements
-      attr_accessor :should_eventuallys # array of hashes representing the should eventually statements
-
-      def initialize(name, parent, &amp;blk)
-        Shoulda.add_context(self)
-        self.name               = name
-        self.parent             = parent
-        self.setup_blocks       = []
-        self.teardown_blocks    = []
-        self.shoulds            = []
-        self.should_eventuallys = []
-        self.subcontexts        = []
-
-        merge_block(&amp;blk)
-        Shoulda.remove_context
-      end
+  # == Contexts
+  #
+  # A context block groups should statements under a common set of setup/teardown methods.
+  # Context blocks can be arbitrarily nested, and can do wonders for improving the maintainability
+  # and readability of your test code.
+  #
+  # A context block can contain setup, should, should_eventually, and teardown blocks.
+  #
+  #  class UserTest &lt;&lt; Test::Unit::TestCase
+  #    context &quot;A User instance&quot; do
+  #      setup do
+  #        @user = User.find(:first)
+  #      end
+  #
+  #      should &quot;return its full name&quot;
+  #        assert_equal 'John Doe', @user.full_name
+  #      end
+  #    end
+  #  end
+  #
+  # This code will produce the method &lt;tt&gt;&quot;test: A User instance should return its full name. &quot;&lt;/tt&gt;.
+  #
+  # Contexts may be nested.  Nested contexts run their setup blocks from out to in before each
+  # should statement.  They then run their teardown blocks from in to out after each should statement.
+  #
+  #  class UserTest &lt;&lt; Test::Unit::TestCase
+  #    context &quot;A User instance&quot; do
+  #      setup do
+  #        @user = User.find(:first)
+  #      end
+  #
+  #      should &quot;return its full name&quot;
+  #        assert_equal 'John Doe', @user.full_name
+  #      end
+  #
+  #      context &quot;with a profile&quot; do
+  #        setup do
+  #          @user.profile = Profile.find(:first)
+  #        end
+  #
+  #        should &quot;return true when sent :has_profile?&quot;
+  #          assert @user.has_profile?
+  #        end
+  #      end
+  #    end
+  #  end
+  #
+  # This code will produce the following methods
+  # * &lt;tt&gt;&quot;test: A User instance should return its full name. &quot;&lt;/tt&gt;
+  # * &lt;tt&gt;&quot;test: A User instance with a profile should return true when sent :has_profile?. &quot;&lt;/tt&gt;
+  #
+  # &lt;b&gt;Just like should statements, a context block can exist next to normal &lt;tt&gt;def test_the_old_way; end&lt;/tt&gt;
+  # tests&lt;/b&gt;.  This means you do not have to fully commit to the context/should syntax in a test file.
+
+  def context(name, &amp;blk)
+    if Shoulda.current_context
+      Shoulda.current_context.context(name, &amp;blk)
+    else
+      context = Shoulda::Context.new(name, self, &amp;blk)
+      context.build
+    end
+  end
 
-      def merge_block(&amp;blk)
-        blk.bind(self).call
-      end
+  class Context # :nodoc:
+
+    attr_accessor :name               # my name
+    attr_accessor :parent             # may be another context, or the original test::unit class.
+    attr_accessor :subcontexts        # array of contexts nested under myself
+    attr_accessor :setup_blocks       # blocks given via setup methods
+    attr_accessor :teardown_blocks    # blocks given via teardown methods
+    attr_accessor :shoulds            # array of hashes representing the should statements
+    attr_accessor :should_eventuallys # array of hashes representing the should eventually statements
+
+    def initialize(name, parent, &amp;blk)
+      Shoulda.add_context(self)
+      self.name               = name
+      self.parent             = parent
+      self.setup_blocks       = []
+      self.teardown_blocks    = []
+      self.shoulds            = []
+      self.should_eventuallys = []
+      self.subcontexts        = []
+
+      merge_block(&amp;blk)
+      Shoulda.remove_context
+    end
 
-      def context(name, &amp;blk)
-        self.subcontexts &lt;&lt; Context.new(name, self, &amp;blk)
-      end
+    def merge_block(&amp;blk)
+      blk.bind(self).call
+    end
 
-      def setup(&amp;blk)
-        self.setup_blocks &lt;&lt; blk
-      end
+    def context(name, &amp;blk)
+      self.subcontexts &lt;&lt; Context.new(name, self, &amp;blk)
+    end
 
-      def teardown(&amp;blk)
-        self.teardown_blocks &lt;&lt; blk
-      end
+    def setup(&amp;blk)
+      self.setup_blocks &lt;&lt; blk
+    end
 
-      def should(name, options = {}, &amp;blk)
-        if block_given?
-          self.shoulds &lt;&lt; { :name =&gt; name, :before =&gt; options[:before], :block =&gt; blk }
-        else
-         self.should_eventuallys &lt;&lt; { :name =&gt; name }
-       end
-      end
+    def teardown(&amp;blk)
+      self.teardown_blocks &lt;&lt; blk
+    end
 
-      def should_eventually(name, &amp;blk)
-        self.should_eventuallys &lt;&lt; { :name =&gt; name, :block =&gt; blk }
-      end
+    def should(name, options = {}, &amp;blk)
+      if block_given?
+        self.shoulds &lt;&lt; { :name =&gt; name, :before =&gt; options[:before], :block =&gt; blk }
+      else
+       self.should_eventuallys &lt;&lt; { :name =&gt; name }
+     end
+    end
 
-      def full_name
-        parent_name = parent.full_name if am_subcontext?
-        return [parent_name, name].join(&quot; &quot;).strip
-      end
+    def should_eventually(name, &amp;blk)
+      self.should_eventuallys &lt;&lt; { :name =&gt; name, :block =&gt; blk }
+    end
 
-      def am_subcontext?
-        parent.is_a?(self.class) # my parent is the same class as myself.
-      end
+    def full_name
+      parent_name = parent.full_name if am_subcontext?
+      return [parent_name, name].join(&quot; &quot;).strip
+    end
 
-      def test_unit_class
-        am_subcontext? ? parent.test_unit_class : parent
-      end
+    def am_subcontext?
+      parent.is_a?(self.class) # my parent is the same class as myself.
+    end
 
-      def create_test_from_should_hash(should)
-        test_name = [&quot;test:&quot;, full_name, &quot;should&quot;, &quot;#{should[:name]}. &quot;].flatten.join(' ').to_sym
+    def test_unit_class
+      am_subcontext? ? parent.test_unit_class : parent
+    end
 
-        if test_unit_class.instance_methods.include?(test_name.to_s)
-          warn &quot;  * WARNING: '#{test_name}' is already defined&quot;
-        end
+    def create_test_from_should_hash(should)
+      test_name = [&quot;test:&quot;, full_name, &quot;should&quot;, &quot;#{should[:name]}. &quot;].flatten.join(' ').to_sym
 
-        context = self
-        test_unit_class.send(:define_method, test_name) do
-          begin
-            context.run_parent_setup_blocks(self)
-            should[:before].bind(self).call if should[:before]
-            context.run_current_setup_blocks(self)
-            should[:block].bind(self).call
-          ensure
-            context.run_all_teardown_blocks(self)
-          end
-        end
+      if test_unit_class.instance_methods.include?(test_name.to_s)
+        warn &quot;  * WARNING: '#{test_name}' is already defined&quot;
       end
 
-      def run_all_setup_blocks(binding)
-        run_parent_setup_blocks(binding)
-        run_current_setup_blocks(binding)
+      context = self
+      test_unit_class.send(:define_method, test_name) do
+        begin
+          context.run_parent_setup_blocks(self)
+          should[:before].bind(self).call if should[:before]
+          context.run_current_setup_blocks(self)
+          should[:block].bind(self).call
+        ensure
+          context.run_all_teardown_blocks(self)
+        end
       end
+    end
 
-      def run_parent_setup_blocks(binding)
-        self.parent.run_all_setup_blocks(binding) if am_subcontext?
-      end
+    def run_all_setup_blocks(binding)
+      run_parent_setup_blocks(binding)
+      run_current_setup_blocks(binding)
+    end
 
-      def run_current_setup_blocks(binding)
-        setup_blocks.each do |setup_block|
-          setup_block.bind(binding).call
-        end
-      end
+    def run_parent_setup_blocks(binding)
+      self.parent.run_all_setup_blocks(binding) if am_subcontext?
+    end
 
-      def run_all_teardown_blocks(binding)
-        teardown_blocks.reverse.each do |teardown_block|
-          teardown_block.bind(binding).call
-        end
-        self.parent.run_all_teardown_blocks(binding) if am_subcontext?
+    def run_current_setup_blocks(binding)
+      setup_blocks.each do |setup_block|
+        setup_block.bind(binding).call
       end
+    end
 
-      def print_should_eventuallys
-        should_eventuallys.each do |should|
-          test_name = [full_name, &quot;should&quot;, &quot;#{should[:name]}. &quot;].flatten.join(' ')
-          puts &quot;  * DEFERRED: &quot; + test_name
-        end
+    def run_all_teardown_blocks(binding)
+      teardown_blocks.reverse.each do |teardown_block|
+        teardown_block.bind(binding).call
       end
+      self.parent.run_all_teardown_blocks(binding) if am_subcontext?
+    end
 
-      def build
-        shoulds.each do |should|
-          create_test_from_should_hash(should)
-        end
-
-        subcontexts.each { |context| context.build }
-
-        print_should_eventuallys
+    def print_should_eventuallys
+      should_eventuallys.each do |should|
+        test_name = [full_name, &quot;should&quot;, &quot;#{should[:name]}. &quot;].flatten.join(' ')
+        puts &quot;  * DEFERRED: &quot; + test_name
       end
+    end
 
-      def method_missing(method, *args, &amp;blk)
-        test_unit_class.send(method, *args, &amp;blk)
+    def build
+      shoulds.each do |should|
+        create_test_from_should_hash(should)
       end
 
+      subcontexts.each { |context| context.build }
+
+      print_should_eventuallys
+    end
+
+    def method_missing(method, *args, &amp;blk)
+      test_unit_class.send(method, *args, &amp;blk)
     end
+
   end
 end</diff>
      <filename>lib/shoulda/context.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,10 +6,10 @@ require 'shoulda/controller/macros'
 module Test # :nodoc: all
   module Unit
     class TestCase
-      extend ThoughtBot::Shoulda::Controller::Macros
-      include ThoughtBot::Shoulda::Controller::Helpers
-      ThoughtBot::Shoulda::Controller::VALID_FORMATS.each do |format|
-        include &quot;ThoughtBot::Shoulda::Controller::#{format.to_s.upcase}&quot;.constantize
+      extend Shoulda::Controller::Macros
+      include Shoulda::Controller::Helpers
+      Shoulda::Controller::VALID_FORMATS.each do |format|
+        include &quot;Shoulda::Controller::#{format.to_s.upcase}&quot;.constantize
       end
     end
   end
@@ -21,10 +21,10 @@ require 'shoulda/action_mailer/assertions'
 module ActionController #:nodoc: all
   module Integration
     class Session
-      include ThoughtBot::Shoulda::Assertions
-      include ThoughtBot::Shoulda::Helpers
-      include ThoughtBot::Shoulda::ActiveRecord::Assertions
-      include ThoughtBot::Shoulda::ActionMailer::Assertions
+      include Shoulda::Assertions
+      include Shoulda::Helpers
+      include Shoulda::ActiveRecord::Assertions
+      include Shoulda::ActionMailer::Assertions
     end
   end
 end</diff>
      <filename>lib/shoulda/controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,196 +1,194 @@
-module ThoughtBot # :nodoc: 
-  module Shoulda # :nodoc: 
-    module Controller # :nodoc:
-      module HTML # :nodoc: all
-        def self.included(other)
-          other.class_eval do
-            extend ThoughtBot::Shoulda::Controller::HTML::ClassMethods
-          end
+module Shoulda # :nodoc: 
+  module Controller # :nodoc:
+    module HTML # :nodoc: all
+      def self.included(other)
+        other.class_eval do
+          extend Shoulda::Controller::HTML::ClassMethods
         end
-  
-        module ClassMethods 
-          def controller_name_from_class
-            self.name.gsub(/Test/, '')
-          end
+      end
 
-          def make_show_html_tests(res)
-            context &quot;on GET to #{controller_name_from_class}#show&quot; do
-              setup do
-                record = get_existing_record(res)
-                parent_params = make_parent_params(res, record)
-                get :show, parent_params.merge({ res.identifier =&gt; record.to_param })          
-              end
+      module ClassMethods 
+        def controller_name_from_class
+          self.name.gsub(/Test/, '')
+        end
 
-              if res.denied.actions.include?(:show)
-                should_not_assign_to res.object
-                should_redirect_to res.denied.redirect
-                should_set_the_flash_to res.denied.flash
-              else
-                should_assign_to res.object          
-                should_respond_with :success
-                should_render_template :show
-                should_not_set_the_flash
-              end
+        def make_show_html_tests(res)
+          context &quot;on GET to #{controller_name_from_class}#show&quot; do
+            setup do
+              record = get_existing_record(res)
+              parent_params = make_parent_params(res, record)
+              get :show, parent_params.merge({ res.identifier =&gt; record.to_param })          
+            end
+
+            if res.denied.actions.include?(:show)
+              should_not_assign_to res.object
+              should_redirect_to res.denied.redirect
+              should_set_the_flash_to res.denied.flash
+            else
+              should_assign_to res.object          
+              should_respond_with :success
+              should_render_template :show
+              should_not_set_the_flash
             end
           end
+        end
 
-          def make_edit_html_tests(res)
-            context &quot;on GET to #{controller_name_from_class}#edit&quot; do
-              setup do
-                @record = get_existing_record(res)
-                parent_params = make_parent_params(res, @record)
-                get :edit, parent_params.merge({ res.identifier =&gt; @record.to_param })          
-              end
-        
-              if res.denied.actions.include?(:edit)
-                should_not_assign_to res.object
-                should_redirect_to res.denied.redirect
-                should_set_the_flash_to res.denied.flash
-              else
-                should_assign_to res.object                    
-                should_respond_with :success
-                should_render_template :edit
-                should_not_set_the_flash
-                should_render_a_form
-                should &quot;set @#{res.object} to requested instance&quot; do
-                  assert_equal @record, assigns(res.object)
-                end
+        def make_edit_html_tests(res)
+          context &quot;on GET to #{controller_name_from_class}#edit&quot; do
+            setup do
+              @record = get_existing_record(res)
+              parent_params = make_parent_params(res, @record)
+              get :edit, parent_params.merge({ res.identifier =&gt; @record.to_param })          
+            end
+      
+            if res.denied.actions.include?(:edit)
+              should_not_assign_to res.object
+              should_redirect_to res.denied.redirect
+              should_set_the_flash_to res.denied.flash
+            else
+              should_assign_to res.object                    
+              should_respond_with :success
+              should_render_template :edit
+              should_not_set_the_flash
+              should_render_a_form
+              should &quot;set @#{res.object} to requested instance&quot; do
+                assert_equal @record, assigns(res.object)
               end
             end
           end
+        end
 
-          def make_index_html_tests(res)
-            context &quot;on GET to #{controller_name_from_class}#index&quot; do
-              setup do
-                record = get_existing_record(res) rescue nil
-                parent_params = make_parent_params(res, record)
-                get(:index, parent_params)          
-              end
+        def make_index_html_tests(res)
+          context &quot;on GET to #{controller_name_from_class}#index&quot; do
+            setup do
+              record = get_existing_record(res) rescue nil
+              parent_params = make_parent_params(res, record)
+              get(:index, parent_params)          
+            end
 
-              if res.denied.actions.include?(:index)
-                should_not_assign_to res.object.to_s.pluralize
-                should_redirect_to res.denied.redirect
-                should_set_the_flash_to res.denied.flash          
-              else
-                should_respond_with :success
-                should_assign_to res.object.to_s.pluralize
-                should_render_template :index
-                should_not_set_the_flash
-              end
+            if res.denied.actions.include?(:index)
+              should_not_assign_to res.object.to_s.pluralize
+              should_redirect_to res.denied.redirect
+              should_set_the_flash_to res.denied.flash          
+            else
+              should_respond_with :success
+              should_assign_to res.object.to_s.pluralize
+              should_render_template :index
+              should_not_set_the_flash
             end
           end
+        end
 
-          def make_new_html_tests(res)
-            context &quot;on GET to #{controller_name_from_class}#new&quot; do
-              setup do
-                record = get_existing_record(res) rescue nil
-                parent_params = make_parent_params(res, record)
-                get(:new, parent_params)          
-              end
+        def make_new_html_tests(res)
+          context &quot;on GET to #{controller_name_from_class}#new&quot; do
+            setup do
+              record = get_existing_record(res) rescue nil
+              parent_params = make_parent_params(res, record)
+              get(:new, parent_params)          
+            end
 
-              if res.denied.actions.include?(:new)
-                should_not_assign_to res.object
-                should_redirect_to res.denied.redirect
-                should_set_the_flash_to res.denied.flash
-              else
-                should_respond_with :success
-                should_assign_to res.object
-                should_not_set_the_flash
-                should_render_template :new
-                should_render_a_form
-              end
+            if res.denied.actions.include?(:new)
+              should_not_assign_to res.object
+              should_redirect_to res.denied.redirect
+              should_set_the_flash_to res.denied.flash
+            else
+              should_respond_with :success
+              should_assign_to res.object
+              should_not_set_the_flash
+              should_render_template :new
+              should_render_a_form
             end
           end
+        end
 
-          def make_destroy_html_tests(res)
-            context &quot;on DELETE to #{controller_name_from_class}#destroy&quot; do
-              setup do
-                @record = get_existing_record(res)
-                parent_params = make_parent_params(res, @record)
-                delete :destroy, parent_params.merge({ res.identifier =&gt; @record.to_param })
-              end
+        def make_destroy_html_tests(res)
+          context &quot;on DELETE to #{controller_name_from_class}#destroy&quot; do
+            setup do
+              @record = get_existing_record(res)
+              parent_params = make_parent_params(res, @record)
+              delete :destroy, parent_params.merge({ res.identifier =&gt; @record.to_param })
+            end
+      
+            if res.denied.actions.include?(:destroy)
+              should_redirect_to res.denied.redirect
+              should_set_the_flash_to res.denied.flash
         
-              if res.denied.actions.include?(:destroy)
-                should_redirect_to res.denied.redirect
-                should_set_the_flash_to res.denied.flash
-          
-                should &quot;not destroy record&quot; do
-                  assert_nothing_raised { assert @record.reload }
-                end
+              should &quot;not destroy record&quot; do
+                assert_nothing_raised { assert @record.reload }
+              end
+            else
+              should_set_the_flash_to res.destroy.flash
+              if res.destroy.redirect.is_a? Symbol
+                should_respond_with res.destroy.redirect
               else
-                should_set_the_flash_to res.destroy.flash
-                if res.destroy.redirect.is_a? Symbol
-                  should_respond_with res.destroy.redirect
-                else
-                  should_redirect_to res.destroy.redirect
-                end
+                should_redirect_to res.destroy.redirect
+              end
 
-                should &quot;destroy record&quot; do
-                  assert_raises(::ActiveRecord::RecordNotFound, &quot;@#{res.object} was not destroyed.&quot;) do
-                    @record.reload
-                  end
+              should &quot;destroy record&quot; do
+                assert_raises(::ActiveRecord::RecordNotFound, &quot;@#{res.object} was not destroyed.&quot;) do
+                  @record.reload
                 end
               end
             end
           end
+        end
 
-          def make_create_html_tests(res)
-            context &quot;on POST to #{controller_name_from_class}#create with #{res.create.params.inspect}&quot; do
-              setup do
-                record = get_existing_record(res) rescue nil
-                parent_params = make_parent_params(res, record)
-                @count = res.klass.count
-                post :create, parent_params.merge(res.object =&gt; res.create.params)
-              end
+        def make_create_html_tests(res)
+          context &quot;on POST to #{controller_name_from_class}#create with #{res.create.params.inspect}&quot; do
+            setup do
+              record = get_existing_record(res) rescue nil
+              parent_params = make_parent_params(res, record)
+              @count = res.klass.count
+              post :create, parent_params.merge(res.object =&gt; res.create.params)
+            end
+      
+            if res.denied.actions.include?(:create)
+              should_redirect_to res.denied.redirect
+              should_set_the_flash_to res.denied.flash
+              should_not_assign_to res.object
         
-              if res.denied.actions.include?(:create)
-                should_redirect_to res.denied.redirect
-                should_set_the_flash_to res.denied.flash
-                should_not_assign_to res.object
-          
-                should &quot;not create new record&quot; do
-                  assert_equal @count, res.klass.count
-                end          
+              should &quot;not create new record&quot; do
+                assert_equal @count, res.klass.count
+              end          
+            else
+              should_assign_to res.object
+              should_set_the_flash_to res.create.flash
+              if res.create.redirect.is_a? Symbol
+                should_respond_with res.create.redirect
               else
-                should_assign_to res.object
-                should_set_the_flash_to res.create.flash
-                if res.create.redirect.is_a? Symbol
-                  should_respond_with res.create.redirect
-                else
-                  should_redirect_to res.create.redirect
-                end
+                should_redirect_to res.create.redirect
+              end
 
-                should &quot;not have errors on @#{res.object}&quot; do
-                  assert_equal [], pretty_error_messages(assigns(res.object)), &quot;@#{res.object} has errors:&quot;            
-                end
-              end      
-            end
+              should &quot;not have errors on @#{res.object}&quot; do
+                assert_equal [], pretty_error_messages(assigns(res.object)), &quot;@#{res.object} has errors:&quot;            
+              end
+            end      
           end
+        end
 
-          def make_update_html_tests(res)
-            context &quot;on PUT to #{controller_name_from_class}#update with #{res.create.params.inspect}&quot; do
-              setup do
-                @record = get_existing_record(res)
-                parent_params = make_parent_params(res, @record)
-                put :update, parent_params.merge(res.identifier =&gt; @record.to_param, res.object =&gt; res.update.params)
-              end
+        def make_update_html_tests(res)
+          context &quot;on PUT to #{controller_name_from_class}#update with #{res.create.params.inspect}&quot; do
+            setup do
+              @record = get_existing_record(res)
+              parent_params = make_parent_params(res, @record)
+              put :update, parent_params.merge(res.identifier =&gt; @record.to_param, res.object =&gt; res.update.params)
+            end
 
-              if res.denied.actions.include?(:update)
-                should_not_assign_to res.object
-                should_redirect_to res.denied.redirect
-                should_set_the_flash_to res.denied.flash
+            if res.denied.actions.include?(:update)
+              should_not_assign_to res.object
+              should_redirect_to res.denied.redirect
+              should_set_the_flash_to res.denied.flash
+            else
+              should_assign_to res.object
+              should_set_the_flash_to(res.update.flash)
+              if res.update.redirect.is_a? Symbol
+                should_respond_with res.update.redirect
               else
-                should_assign_to res.object
-                should_set_the_flash_to(res.update.flash)
-                if res.update.redirect.is_a? Symbol
-                  should_respond_with res.update.redirect
-                else
-                  should_redirect_to res.update.redirect
-                end
-                
-                should &quot;not have errors on @#{res.object}&quot; do
-                  assert_equal [], pretty_error_messages(assigns(res.object)), &quot;@#{res.object} has errors:&quot;
-                end
+                should_redirect_to res.update.redirect
+              end
+              
+              should &quot;not have errors on @#{res.object}&quot; do
+                assert_equal [], pretty_error_messages(assigns(res.object)), &quot;@#{res.object} has errors:&quot;
               end
             end
           end</diff>
      <filename>lib/shoulda/controller/formats/html.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,170 +1,168 @@
-module ThoughtBot # :nodoc: 
-  module Shoulda # :nodoc: 
-    module Controller # :nodoc:
-      module XML 
-        def self.included(other) #:nodoc:
-          other.class_eval do
-            extend ThoughtBot::Shoulda::Controller::XML::ClassMethods
-          end
+module Shoulda # :nodoc: 
+  module Controller # :nodoc:
+    module XML 
+      def self.included(other) #:nodoc:
+        other.class_eval do
+          extend Shoulda::Controller::XML::ClassMethods
         end
-  
-        module ClassMethods
-          # Macro that creates a test asserting that the controller responded with an XML content-type
-          # and that the XML contains +&lt;name/&gt;+ as the root element.
-          def should_respond_with_xml_for(name = nil)
-            should &quot;have ContentType set to 'application/xml'&quot; do
-              assert_xml_response
-            end
-            
-            if name
-              should &quot;return &lt;#{name}/&gt; as the root element&quot; do
-                body = @response.body.first(100).map {|l| &quot;  #{l}&quot;}
-                assert_select name.to_s.dasherize, 1, &quot;Body:\n#{body}...\nDoes not have &lt;#{name}/&gt; as the root element.&quot;
-              end
-            end
+      end
+
+      module ClassMethods
+        # Macro that creates a test asserting that the controller responded with an XML content-type
+        # and that the XML contains +&lt;name/&gt;+ as the root element.
+        def should_respond_with_xml_for(name = nil)
+          should &quot;have ContentType set to 'application/xml'&quot; do
+            assert_xml_response
           end
-          alias should_respond_with_xml should_respond_with_xml_for
           
-          protected
-                    
-          def make_show_xml_tests(res) # :nodoc:
-            context &quot;on GET to #{controller_name_from_class}#show as xml&quot; do
-              setup do
-                request_xml
-                record = get_existing_record(res)
-                parent_params = make_parent_params(res, record)
-                get :show, parent_params.merge({ res.identifier =&gt; record.to_param })          
-              end
-
-              if res.denied.actions.include?(:show)
-                should_not_assign_to res.object
-                should_respond_with 401
-              else
-                should_assign_to res.object          
-                should_respond_with :success
-                should_respond_with_xml_for res.object
-              end
+          if name
+            should &quot;return &lt;#{name}/&gt; as the root element&quot; do
+              body = @response.body.first(100).map {|l| &quot;  #{l}&quot;}
+              assert_select name.to_s.dasherize, 1, &quot;Body:\n#{body}...\nDoes not have &lt;#{name}/&gt; as the root element.&quot;
             end
           end
+        end
+        alias should_respond_with_xml should_respond_with_xml_for
+        
+        protected
+                  
+        def make_show_xml_tests(res) # :nodoc:
+          context &quot;on GET to #{controller_name_from_class}#show as xml&quot; do
+            setup do
+              request_xml
+              record = get_existing_record(res)
+              parent_params = make_parent_params(res, record)
+              get :show, parent_params.merge({ res.identifier =&gt; record.to_param })          
+            end
 
-          def make_edit_xml_tests(res) # :nodoc:
-            # XML doesn't need an :edit action
+            if res.denied.actions.include?(:show)
+              should_not_assign_to res.object
+              should_respond_with 401
+            else
+              should_assign_to res.object          
+              should_respond_with :success
+              should_respond_with_xml_for res.object
+            end
           end
+        end
 
-          def make_new_xml_tests(res) # :nodoc:
-            # XML doesn't need a :new action
-          end
+        def make_edit_xml_tests(res) # :nodoc:
+          # XML doesn't need an :edit action
+        end
 
-          def make_index_xml_tests(res) # :nodoc:
-            context &quot;on GET to #{controller_name_from_class}#index as xml&quot; do
-              setup do
-                request_xml
-                parent_params = make_parent_params(res)
-                get(:index, parent_params)          
-              end
+        def make_new_xml_tests(res) # :nodoc:
+          # XML doesn't need a :new action
+        end
 
-              if res.denied.actions.include?(:index)
-                should_not_assign_to res.object.to_s.pluralize
-                should_respond_with 401          
-              else
-                should_respond_with :success
-                should_respond_with_xml_for res.object.to_s.pluralize
-                should_assign_to res.object.to_s.pluralize
-              end
+        def make_index_xml_tests(res) # :nodoc:
+          context &quot;on GET to #{controller_name_from_class}#index as xml&quot; do
+            setup do
+              request_xml
+              parent_params = make_parent_params(res)
+              get(:index, parent_params)          
+            end
+
+            if res.denied.actions.include?(:index)
+              should_not_assign_to res.object.to_s.pluralize
+              should_respond_with 401          
+            else
+              should_respond_with :success
+              should_respond_with_xml_for res.object.to_s.pluralize
+              should_assign_to res.object.to_s.pluralize
             end
           end
+        end
 
-          def make_destroy_xml_tests(res) # :nodoc:
-            context &quot;on DELETE to #{controller_name_from_class}#destroy as xml&quot; do
-              setup do
-                request_xml
-                @record = get_existing_record(res)
-                parent_params = make_parent_params(res, @record)
-                delete :destroy, parent_params.merge({ res.identifier =&gt; @record.to_param })
-              end
+        def make_destroy_xml_tests(res) # :nodoc:
+          context &quot;on DELETE to #{controller_name_from_class}#destroy as xml&quot; do
+            setup do
+              request_xml
+              @record = get_existing_record(res)
+              parent_params = make_parent_params(res, @record)
+              delete :destroy, parent_params.merge({ res.identifier =&gt; @record.to_param })
+            end
+      
+            if res.denied.actions.include?(:destroy)
+              should_respond_with 401
         
-              if res.denied.actions.include?(:destroy)
-                should_respond_with 401
-          
-                should &quot;not destroy record&quot; do
-                  assert @record.reload
-                end
-              else
-                should &quot;destroy record&quot; do
-                  assert_raises(::ActiveRecord::RecordNotFound, &quot;@#{res.object} was not destroyed.&quot;) do
-                    @record.reload
-                  end
+              should &quot;not destroy record&quot; do
+                assert @record.reload
+              end
+            else
+              should &quot;destroy record&quot; do
+                assert_raises(::ActiveRecord::RecordNotFound, &quot;@#{res.object} was not destroyed.&quot;) do
+                  @record.reload
                 end
               end
             end
           end
+        end
 
-          def make_create_xml_tests(res) # :nodoc:
-            context &quot;on POST to #{controller_name_from_class}#create as xml&quot; do
-              setup do
-                request_xml
-                parent_params = make_parent_params(res)
-                @count = res.klass.count
-                post :create, parent_params.merge(res.object =&gt; res.create.params)
-              end
+        def make_create_xml_tests(res) # :nodoc:
+          context &quot;on POST to #{controller_name_from_class}#create as xml&quot; do
+            setup do
+              request_xml
+              parent_params = make_parent_params(res)
+              @count = res.klass.count
+              post :create, parent_params.merge(res.object =&gt; res.create.params)
+            end
+      
+            if res.denied.actions.include?(:create)
+              should_respond_with 401
+              should_not_assign_to res.object
         
-              if res.denied.actions.include?(:create)
-                should_respond_with 401
-                should_not_assign_to res.object
-          
-                should &quot;not create new record&quot; do
-                  assert_equal @count, res.klass.count
-                end          
-              else
-                should_assign_to res.object
+              should &quot;not create new record&quot; do
+                assert_equal @count, res.klass.count
+              end          
+            else
+              should_assign_to res.object
 
-                should &quot;not have errors on @#{res.object}&quot; do
-                  assert_equal [], pretty_error_messages(assigns(res.object)), &quot;@#{res.object} has errors:&quot;            
-                end
-              end      
-            end
+              should &quot;not have errors on @#{res.object}&quot; do
+                assert_equal [], pretty_error_messages(assigns(res.object)), &quot;@#{res.object} has errors:&quot;            
+              end
+            end      
           end
+        end
 
-          def make_update_xml_tests(res) # :nodoc:
-            context &quot;on PUT to #{controller_name_from_class}#update as xml&quot; do
-              setup do
-                request_xml
-                @record = get_existing_record(res)
-                parent_params = make_parent_params(res, @record)
-                put :update, parent_params.merge(res.identifier =&gt; @record.to_param, res.object =&gt; res.update.params)
-              end
+        def make_update_xml_tests(res) # :nodoc:
+          context &quot;on PUT to #{controller_name_from_class}#update as xml&quot; do
+            setup do
+              request_xml
+              @record = get_existing_record(res)
+              parent_params = make_parent_params(res, @record)
+              put :update, parent_params.merge(res.identifier =&gt; @record.to_param, res.object =&gt; res.update.params)
+            end
 
-              if res.denied.actions.include?(:update)
-                should_not_assign_to res.object
-                should_respond_with 401
-              else
-                should_assign_to res.object
+            if res.denied.actions.include?(:update)
+              should_not_assign_to res.object
+              should_respond_with 401
+            else
+              should_assign_to res.object
 
-                should &quot;not have errors on @#{res.object}&quot; do
-                  assert_equal [], assigns(res.object).errors.full_messages, &quot;@#{res.object} has errors:&quot;
-                end
+              should &quot;not have errors on @#{res.object}&quot; do
+                assert_equal [], assigns(res.object).errors.full_messages, &quot;@#{res.object} has errors:&quot;
               end
             end
           end
         end
+      end
 
-        # Sets the next request's format to 'application/xml'
-        def request_xml
-          @request.accept = &quot;application/xml&quot;
-        end
-        
-        # Asserts that the controller's response was 'application/xml'
-        def assert_xml_response
-          content_type = (@response.headers[&quot;Content-Type&quot;] || @response.headers[&quot;type&quot;]).to_s
-          regex = %r{\bapplication/xml\b}
+      # Sets the next request's format to 'application/xml'
+      def request_xml
+        @request.accept = &quot;application/xml&quot;
+      end
+      
+      # Asserts that the controller's response was 'application/xml'
+      def assert_xml_response
+        content_type = (@response.headers[&quot;Content-Type&quot;] || @response.headers[&quot;type&quot;]).to_s
+        regex = %r{\bapplication/xml\b}
 
-          msg = &quot;Content Type '#{content_type.inspect}' doesn't match '#{regex.inspect}'\n&quot;
-          msg += &quot;Body: #{@response.body.first(100).chomp} ...&quot; 
+        msg = &quot;Content Type '#{content_type.inspect}' doesn't match '#{regex.inspect}'\n&quot;
+        msg += &quot;Body: #{@response.body.first(100).chomp} ...&quot; 
 
-          assert_match regex, content_type, msg
-        end
-        
+        assert_match regex, content_type, msg
       end
+      
     end
   end
 end</diff>
      <filename>lib/shoulda/controller/formats/xml.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,63 +1,61 @@
-module ThoughtBot # :nodoc:
-  module Shoulda # :nodoc:
-    module Controller # :nodoc:
-      module Helpers # :nodoc:
-        private # :enddoc:
+module Shoulda # :nodoc:
+  module Controller # :nodoc:
+    module Helpers # :nodoc:
+      private # :enddoc:
 
-        SPECIAL_INSTANCE_VARIABLES = %w{
-          _cookies
-          _flash
-          _headers
-          _params
-          _request
-          _response
-          _session
-          action_name
-          before_filter_chain_aborted
-          cookies
-          flash
-          headers
-          ignore_missing_templates
-          logger
-          params
-          request
-          request_origin
-          response
-          session
-          template
-          template_class
-          template_root
-          url
-          variables_added
-        }.map(&amp;:to_s)
+      SPECIAL_INSTANCE_VARIABLES = %w{
+        _cookies
+        _flash
+        _headers
+        _params
+        _request
+        _response
+        _session
+        action_name
+        before_filter_chain_aborted
+        cookies
+        flash
+        headers
+        ignore_missing_templates
+        logger
+        params
+        request
+        request_origin
+        response
+        session
+        template
+        template_class
+        template_root
+        url
+        variables_added
+      }.map(&amp;:to_s)
 
-        def instantiate_variables_from_assigns(*names, &amp;blk)
-          old = {}
-          names = (@response.template.assigns.keys - SPECIAL_INSTANCE_VARIABLES) if names.empty?
-          names.each do |name|
-            old[name] = instance_variable_get(&quot;@#{name}&quot;)
-            instance_variable_set(&quot;@#{name}&quot;, assigns(name.to_sym))
-          end
-          blk.call
-          names.each do |name|
-            instance_variable_set(&quot;@#{name}&quot;, old[name])
-          end
+      def instantiate_variables_from_assigns(*names, &amp;blk)
+        old = {}
+        names = (@response.template.assigns.keys - SPECIAL_INSTANCE_VARIABLES) if names.empty?
+        names.each do |name|
+          old[name] = instance_variable_get(&quot;@#{name}&quot;)
+          instance_variable_set(&quot;@#{name}&quot;, assigns(name.to_sym))
         end
+        blk.call
+        names.each do |name|
+          instance_variable_set(&quot;@#{name}&quot;, old[name])
+        end
+      end
 
-        def get_existing_record(res) # :nodoc:
-          returning(instance_variable_get(&quot;@#{res.object}&quot;)) do |record|
-            assert(record, &quot;This test requires you to set @#{res.object} in your setup block&quot;)
-          end
+      def get_existing_record(res) # :nodoc:
+        returning(instance_variable_get(&quot;@#{res.object}&quot;)) do |record|
+          assert(record, &quot;This test requires you to set @#{res.object} in your setup block&quot;)
         end
+      end
 
-        def make_parent_params(resource, record = nil, parent_names = nil) # :nodoc:
-          parent_names ||= resource.parents.reverse
-          return {} if parent_names == [] # Base case
-          parent_name = parent_names.shift
-          parent = record ? record.send(parent_name) : parent_name.to_s.classify.constantize.find(:first)
+      def make_parent_params(resource, record = nil, parent_names = nil) # :nodoc:
+        parent_names ||= resource.parents.reverse
+        return {} if parent_names == [] # Base case
+        parent_name = parent_names.shift
+        parent = record ? record.send(parent_name) : parent_name.to_s.classify.constantize.find(:first)
 
-          { :&quot;#{parent_name}_id&quot; =&gt; parent.to_param }.merge(make_parent_params(resource, parent, parent_names))
-        end
+        { :&quot;#{parent_name}_id&quot; =&gt; parent.to_param }.merge(make_parent_params(resource, parent, parent_names))
       end
     end
   end</diff>
      <filename>lib/shoulda/controller/helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,314 +1,312 @@
-module ThoughtBot # :nodoc:
-  module Shoulda # :nodoc:
-    module Controller # :nodoc:
-      # = Macro test helpers for your controllers
+module Shoulda # :nodoc:
+  module Controller # :nodoc:
+    # = Macro test helpers for your controllers
+    #
+    # By using the macro helpers you can quickly and easily create concise and easy to read test suites.
+    #
+    # This code segment:
+    #   context &quot;on GET to :show for first record&quot; do
+    #     setup do
+    #       get :show, :id =&gt; 1
+    #     end
+    #
+    #     should_assign_to :user
+    #     should_respond_with :success
+    #     should_render_template :show
+    #     should_not_set_the_flash
+    #
+    #     should &quot;do something else really cool&quot; do
+    #       assert_equal 1, assigns(:user).id
+    #     end
+    #   end
+    #
+    # Would produce 5 tests for the +show+ action
+    #
+    # Furthermore, the should_be_restful helper will create an entire set of tests which will verify that your
+    # controller responds restfully to a variety of requested formats.
+    module Macros
+      # &lt;b&gt;DEPRECATED:&lt;/b&gt; Please see
+      # http://thoughtbot.lighthouseapp.com/projects/5807/tickets/78 for more
+      # information.
       #
-      # By using the macro helpers you can quickly and easily create concise and easy to read test suites.
+      # Generates a full suite of tests for a restful controller.
       #
-      # This code segment:
-      #   context &quot;on GET to :show for first record&quot; do
-      #     setup do
-      #       get :show, :id =&gt; 1
-      #     end
+      # The following definition will generate tests for the +index+, +show+, +new+,
+      # +edit+, +create+, +update+ and +destroy+ actions, in both +html+ and +xml+ formats:
       #
-      #     should_assign_to :user
-      #     should_respond_with :success
-      #     should_render_template :show
-      #     should_not_set_the_flash
+      #   should_be_restful do |resource|
+      #     resource.parent = :user
       #
-      #     should &quot;do something else really cool&quot; do
-      #       assert_equal 1, assigns(:user).id
-      #     end
+      #     resource.create.params = { :title =&gt; &quot;first post&quot;, :body =&gt; 'blah blah blah'}
+      #     resource.update.params = { :title =&gt; &quot;changed&quot; }
       #   end
       #
-      # Would produce 5 tests for the +show+ action
+      # This generates about 40 tests, all of the format:
+      #   &quot;on GET to :show should assign @user.&quot;
+      #   &quot;on GET to :show should not set the flash.&quot;
+      #   &quot;on GET to :show should render 'show' template.&quot;
+      #   &quot;on GET to :show should respond with success.&quot;
+      #   &quot;on GET to :show as xml should assign @user.&quot;
+      #   &quot;on GET to :show as xml should have ContentType set to 'application/xml'.&quot;
+      #   &quot;on GET to :show as xml should respond with success.&quot;
+      #   &quot;on GET to :show as xml should return &lt;user/&gt; as the root element.&quot;
+      # The +resource+ parameter passed into the block is a ResourceOptions object, and
+      # is used to configure the tests for the details of your resources.
       #
-      # Furthermore, the should_be_restful helper will create an entire set of tests which will verify that your
-      # controller responds restfully to a variety of requested formats.
-      module Macros
-        # &lt;b&gt;DEPRECATED:&lt;/b&gt; Please see
-        # http://thoughtbot.lighthouseapp.com/projects/5807/tickets/78 for more
-        # information.
-        #
-        # Generates a full suite of tests for a restful controller.
-        #
-        # The following definition will generate tests for the +index+, +show+, +new+,
-        # +edit+, +create+, +update+ and +destroy+ actions, in both +html+ and +xml+ formats:
-        #
-        #   should_be_restful do |resource|
-        #     resource.parent = :user
-        #
-        #     resource.create.params = { :title =&gt; &quot;first post&quot;, :body =&gt; 'blah blah blah'}
-        #     resource.update.params = { :title =&gt; &quot;changed&quot; }
-        #   end
-        #
-        # This generates about 40 tests, all of the format:
-        #   &quot;on GET to :show should assign @user.&quot;
-        #   &quot;on GET to :show should not set the flash.&quot;
-        #   &quot;on GET to :show should render 'show' template.&quot;
-        #   &quot;on GET to :show should respond with success.&quot;
-        #   &quot;on GET to :show as xml should assign @user.&quot;
-        #   &quot;on GET to :show as xml should have ContentType set to 'application/xml'.&quot;
-        #   &quot;on GET to :show as xml should respond with success.&quot;
-        #   &quot;on GET to :show as xml should return &lt;user/&gt; as the root element.&quot;
-        # The +resource+ parameter passed into the block is a ResourceOptions object, and
-        # is used to configure the tests for the details of your resources.
-        #
-        def should_be_restful(&amp;blk) # :yields: resource
-          warn &quot;[DEPRECATION] should_be_restful is deprecated.  Please see http://thoughtbot.lighthouseapp.com/projects/5807/tickets/78 for more information.&quot;
+      def should_be_restful(&amp;blk) # :yields: resource
+        warn &quot;[DEPRECATION] should_be_restful is deprecated.  Please see http://thoughtbot.lighthouseapp.com/projects/5807/tickets/78 for more information.&quot;
 
-          resource = ResourceOptions.new
-          blk.call(resource)
-          resource.normalize!(self)
+        resource = ResourceOptions.new
+        blk.call(resource)
+        resource.normalize!(self)
 
-          resource.formats.each do |format|
-            resource.actions.each do |action|
-              if self.respond_to? :&quot;make_#{action}_#{format}_tests&quot;
-                self.send(:&quot;make_#{action}_#{format}_tests&quot;, resource)
-              else
-                should &quot;test #{action} #{format}&quot; do
-                  flunk &quot;Test for #{action} as #{format} not implemented&quot;
-                end
+        resource.formats.each do |format|
+          resource.actions.each do |action|
+            if self.respond_to? :&quot;make_#{action}_#{format}_tests&quot;
+              self.send(:&quot;make_#{action}_#{format}_tests&quot;, resource)
+            else
+              should &quot;test #{action} #{format}&quot; do
+                flunk &quot;Test for #{action} as #{format} not implemented&quot;
               end
             end
           end
         end
+      end
 
-        # :section: Test macros
-        # Macro that creates a test asserting that the flash contains the given value.
-        # val can be a String, a Regex, or nil (indicating that the flash should not be set)
-        #
-        # Example:
-        #
-        #   should_set_the_flash_to &quot;Thank you for placing this order.&quot;
-        #   should_set_the_flash_to /created/i
-        #   should_set_the_flash_to nil
-        def should_set_the_flash_to(val)
-          if val
-            should &quot;have #{val.inspect} in the flash&quot; do
-              assert_contains flash.values, val, &quot;, Flash: #{flash.inspect}&quot;
-            end
-          else
-            should &quot;not set the flash&quot; do
-              assert_equal({}, flash, &quot;Flash was set to:\n#{flash.inspect}&quot;)
-            end
+      # :section: Test macros
+      # Macro that creates a test asserting that the flash contains the given value.
+      # val can be a String, a Regex, or nil (indicating that the flash should not be set)
+      #
+      # Example:
+      #
+      #   should_set_the_flash_to &quot;Thank you for placing this order.&quot;
+      #   should_set_the_flash_to /created/i
+      #   should_set_the_flash_to nil
+      def should_set_the_flash_to(val)
+        if val
+          should &quot;have #{val.inspect} in the flash&quot; do
+            assert_contains flash.values, val, &quot;, Flash: #{flash.inspect}&quot;
+          end
+        else
+          should &quot;not set the flash&quot; do
+            assert_equal({}, flash, &quot;Flash was set to:\n#{flash.inspect}&quot;)
           end
         end
+      end
 
-        # Macro that creates a test asserting that the flash is empty.  Same as
-        # @should_set_the_flash_to nil@
-        def should_not_set_the_flash
-          should_set_the_flash_to nil
-        end
+      # Macro that creates a test asserting that the flash is empty.  Same as
+      # @should_set_the_flash_to nil@
+      def should_not_set_the_flash
+        should_set_the_flash_to nil
+      end
 
-        # Macro that creates a test asserting that filter_parameter_logging
-        # is set for the specified keys
-        #
-        # Example:
-        #
-        #   should_filter_params :password, :ssn
-        def should_filter_params(*keys)
-          keys.each do |key|
-            should &quot;filter #{key}&quot; do
-              assert @controller.respond_to?(:filter_parameters),
-                &quot;The key #{key} is not filtered&quot;
-              filtered = @controller.send(:filter_parameters, {key.to_s =&gt; key.to_s})
-              assert_equal '[FILTERED]', filtered[key.to_s],
-                &quot;The key #{key} is not filtered&quot;
-            end
+      # Macro that creates a test asserting that filter_parameter_logging
+      # is set for the specified keys
+      #
+      # Example:
+      #
+      #   should_filter_params :password, :ssn
+      def should_filter_params(*keys)
+        keys.each do |key|
+          should &quot;filter #{key}&quot; do
+            assert @controller.respond_to?(:filter_parameters),
+              &quot;The key #{key} is not filtered&quot;
+            filtered = @controller.send(:filter_parameters, {key.to_s =&gt; key.to_s})
+            assert_equal '[FILTERED]', filtered[key.to_s],
+              &quot;The key #{key} is not filtered&quot;
           end
         end
+      end
 
-        # Macro that creates a test asserting that the controller assigned to
-        # each of the named instance variable(s).
-        #
-        # Options:
-        # * &lt;tt&gt;:class&lt;/tt&gt; - The expected class of the instance variable being checked.
-        # * &lt;tt&gt;:equals&lt;/tt&gt; - A string which is evaluated and compared for equality with
-        # the instance variable being checked.
-        #
-        # Example:
-        #
-        #   should_assign_to :user, :posts
-        #   should_assign_to :user, :class =&gt; User
-        #   should_assign_to :user, :equals =&gt; '@user'
-        def should_assign_to(*names)
-          opts = names.extract_options!
-          names.each do |name|
-            test_name = &quot;assign @#{name}&quot;
-            test_name &lt;&lt; &quot; as class #{opts[:class]}&quot; if opts[:class]
-            test_name &lt;&lt; &quot; which is equal to #{opts[:equals]}&quot; if opts[:equals]
-            should test_name do
-              assigned_value = assigns(name.to_sym)
-              assert assigned_value, &quot;The action isn't assigning to @#{name}&quot;
-              assert_kind_of opts[:class], assigned_value if opts[:class]
-              if opts[:equals]
-                instantiate_variables_from_assigns do
-                  expected_value = eval(opts[:equals], self.send(:binding), __FILE__, __LINE__)
-                  assert_equal expected_value, assigned_value,
-                               &quot;Instance variable @#{name} expected to be #{expected_value}&quot; +
-                               &quot; but was #{assigned_value}&quot;
-                end
+      # Macro that creates a test asserting that the controller assigned to
+      # each of the named instance variable(s).
+      #
+      # Options:
+      # * &lt;tt&gt;:class&lt;/tt&gt; - The expected class of the instance variable being checked.
+      # * &lt;tt&gt;:equals&lt;/tt&gt; - A string which is evaluated and compared for equality with
+      # the instance variable being checked.
+      #
+      # Example:
+      #
+      #   should_assign_to :user, :posts
+      #   should_assign_to :user, :class =&gt; User
+      #   should_assign_to :user, :equals =&gt; '@user'
+      def should_assign_to(*names)
+        opts = names.extract_options!
+        names.each do |name|
+          test_name = &quot;assign @#{name}&quot;
+          test_name &lt;&lt; &quot; as class #{opts[:class]}&quot; if opts[:class]
+          test_name &lt;&lt; &quot; which is equal to #{opts[:equals]}&quot; if opts[:equals]
+          should test_name do
+            assigned_value = assigns(name.to_sym)
+            assert assigned_value, &quot;The action isn't assigning to @#{name}&quot;
+            assert_kind_of opts[:class], assigned_value if opts[:class]
+            if opts[:equals]
+              instantiate_variables_from_assigns do
+                expected_value = eval(opts[:equals], self.send(:binding), __FILE__, __LINE__)
+                assert_equal expected_value, assigned_value,
+                             &quot;Instance variable @#{name} expected to be #{expected_value}&quot; +
+                             &quot; but was #{assigned_value}&quot;
               end
             end
           end
         end
+      end
 
-        # 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, :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
+      # 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, :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
 
-        # Macro that creates a test asserting that the controller responded with a 'response' status code.
-        # Example:
-        #
-        #   should_respond_with :success
-        def should_respond_with(response)
-          should &quot;respond with #{response}&quot; do
-            assert_response response
-          end
+      # Macro that creates a test asserting that the controller responded with a 'response' status code.
+      # Example:
+      #
+      #   should_respond_with :success
+      def should_respond_with(response)
+        should &quot;respond with #{response}&quot; do
+          assert_response response
         end
+      end
 
-        # Macro that creates a test asserting that the response content type was 'content_type'.
-        # Example:
-        #
-        #   should_respond_with_content_type 'application/rss+xml'
-        #   should_respond_with_content_type :rss
-        #   should_respond_with_content_type /rss/
-        def should_respond_with_content_type(content_type)
-          should &quot;respond with content type of #{content_type}&quot; do
-            content_type = Mime::EXTENSION_LOOKUP[content_type.to_s].to_s if content_type.is_a? Symbol
-            if content_type.is_a? Regexp
-              assert_match content_type, @response.content_type, &quot;Expected to match #{content_type} but was actually #{@response.content_type}&quot;
-            else
-              assert_equal content_type, @response.content_type, &quot;Expected #{content_type} but was actually #{@response.content_type}&quot;
-            end
+      # Macro that creates a test asserting that the response content type was 'content_type'.
+      # Example:
+      #
+      #   should_respond_with_content_type 'application/rss+xml'
+      #   should_respond_with_content_type :rss
+      #   should_respond_with_content_type /rss/
+      def should_respond_with_content_type(content_type)
+        should &quot;respond with content type of #{content_type}&quot; do
+          content_type = Mime::EXTENSION_LOOKUP[content_type.to_s].to_s if content_type.is_a? Symbol
+          if content_type.is_a? Regexp
+            assert_match content_type, @response.content_type, &quot;Expected to match #{content_type} but was actually #{@response.content_type}&quot;
+          else
+            assert_equal content_type, @response.content_type, &quot;Expected #{content_type} but was actually #{@response.content_type}&quot;
           end
         end
+      end
 
-        # Macro that creates a test asserting that a value returned from the session is correct.
-        # The given string is evaled to produce the resulting redirect path.  All of the instance variables
-        # set by the controller are available to the evaled string.
-        # Example:
-        #
-        #   should_return_from_session :user_id, '@user.id'
-        #   should_return_from_session :message, '&quot;Free stuff&quot;'
-        def should_return_from_session(key, expected)
-          should &quot;return the correct value from the session for key #{key}&quot; do
-            instantiate_variables_from_assigns do
-              expected_value = eval(expected, self.send(:binding), __FILE__, __LINE__)
-              assert_equal expected_value, session[key], &quot;Expected #{expected_value.inspect} but was #{session[key]}&quot;
-            end
+      # Macro that creates a test asserting that a value returned from the session is correct.
+      # The given string is evaled to produce the resulting redirect path.  All of the instance variables
+      # set by the controller are available to the evaled string.
+      # Example:
+      #
+      #   should_return_from_session :user_id, '@user.id'
+      #   should_return_from_session :message, '&quot;Free stuff&quot;'
+      def should_return_from_session(key, expected)
+        should &quot;return the correct value from the session for key #{key}&quot; do
+          instantiate_variables_from_assigns do
+            expected_value = eval(expected, self.send(:binding), __FILE__, __LINE__)
+            assert_equal expected_value, session[key], &quot;Expected #{expected_value.inspect} but was #{session[key]}&quot;
           end
         end
+      end
 
-        # Macro that creates a test asserting that the controller rendered the given template.
-        # Example:
-        #
-        #   should_render_template :new
-        def should_render_template(template)
-          should &quot;render template #{template.inspect}&quot; do
-            assert_template template.to_s
-          end
+      # Macro that creates a test asserting that the controller rendered the given template.
+      # Example:
+      #
+      #   should_render_template :new
+      def should_render_template(template)
+        should &quot;render template #{template.inspect}&quot; do
+          assert_template template.to_s
         end
+      end
 
-        # Macro that creates a test asserting that the controller rendered with the given layout.
-        # Example:
-        #
-        #   should_render_with_layout 'special'
-        def should_render_with_layout(expected_layout = 'application')
-          if expected_layout
-            should &quot;render with #{expected_layout.inspect} layout&quot; do
-              response_layout = @response.layout.blank? ? &quot;&quot; : @response.layout.split('/').last
-              assert_equal expected_layout.to_s,
-                           response_layout,
-                           &quot;Expected to render with layout #{expected_layout} but was rendered with #{response_layout}&quot;
-            end
-          else
-            should &quot;render without layout&quot; do
-              assert_nil @response.layout,
-                         &quot;Expected no layout, but was rendered using #{@response.layout}&quot;
-            end
+      # Macro that creates a test asserting that the controller rendered with the given layout.
+      # Example:
+      #
+      #   should_render_with_layout 'special'
+      def should_render_with_layout(expected_layout = 'application')
+        if expected_layout
+          should &quot;render with #{expected_layout.inspect} layout&quot; do
+            response_layout = @response.layout.blank? ? &quot;&quot; : @response.layout.split('/').last
+            assert_equal expected_layout.to_s,
+                         response_layout,
+                         &quot;Expected to render with layout #{expected_layout} but was rendered with #{response_layout}&quot;
+          end
+        else
+          should &quot;render without layout&quot; do
+            assert_nil @response.layout,
+                       &quot;Expected no layout, but was rendered using #{@response.layout}&quot;
           end
         end
+      end
 
-        # Macro that creates a test asserting that the controller rendered without a layout.
-        # Same as @should_render_with_layout false@
-        def should_render_without_layout
-          should_render_with_layout nil
-        end
+      # Macro that creates a test asserting that the controller rendered without a layout.
+      # Same as @should_render_with_layout false@
+      def should_render_without_layout
+        should_render_with_layout nil
+      end
 
-        # Macro that creates a test asserting that the controller returned a redirect to the given path.
-        # The given string is evaled to produce the resulting redirect path.  All of the instance variables
-        # set by the controller are available to the evaled string.
-        # Example:
-        #
-        #   should_redirect_to '&quot;/&quot;'
-        #   should_redirect_to &quot;user_url(@user)&quot;
-        #   should_redirect_to &quot;users_url&quot;
-        def should_redirect_to(url)
-          should &quot;redirect to #{url.inspect}&quot; do
-            instantiate_variables_from_assigns do
-              assert_redirected_to eval(url, self.send(:binding), __FILE__, __LINE__)
-            end
+      # Macro that creates a test asserting that the controller returned a redirect to the given path.
+      # The given string is evaled to produce the resulting redirect path.  All of the instance variables
+      # set by the controller are available to the evaled string.
+      # Example:
+      #
+      #   should_redirect_to '&quot;/&quot;'
+      #   should_redirect_to &quot;user_url(@user)&quot;
+      #   should_redirect_to &quot;users_url&quot;
+      def should_redirect_to(url)
+        should &quot;redirect to #{url.inspect}&quot; do
+          instantiate_variables_from_assigns do
+            assert_redirected_to eval(url, self.send(:binding), __FILE__, __LINE__)
           end
         end
+      end
 
-        # Macro that creates a test asserting that the rendered view contains a &lt;form&gt; element.
-        def should_render_a_form
-          should &quot;display a form&quot; do
-            assert_select &quot;form&quot;, true, &quot;The template doesn't contain a &lt;form&gt; element&quot;
-          end
+      # Macro that creates a test asserting that the rendered view contains a &lt;form&gt; element.
+      def should_render_a_form
+        should &quot;display a form&quot; do
+          assert_select &quot;form&quot;, true, &quot;The template doesn't contain a &lt;form&gt; element&quot;
         end
+      end
 
-        # Macro that creates a routing test. It tries to use the given HTTP
-        # +method+ on the given +path+, and asserts that it routes to the
-        # given +options+.
-        #
-        # If you don't specify a :controller, it will try to guess the controller
-        # based on the current test.
-        #
-        # +to_param+ is called on the +options+ given.
-        #
-        # Examples:
-        #
-        #   should_route :get, &quot;/posts&quot;, :controller =&gt; :posts, :action =&gt; :index
-        #   should_route :get, &quot;/posts/new&quot;, :action =&gt; :new
-        #   should_route :post, &quot;/posts&quot;, :action =&gt; :create
-        #   should_route :get, &quot;/posts/1&quot;, :action =&gt; :show, :id =&gt; 1
-        #   should_route :edit, &quot;/posts/1&quot;, :action =&gt; :show, :id =&gt; 1
-        #   should_route :put, &quot;/posts/1&quot;, :action =&gt; :update, :id =&gt; 1
-        #   should_route :delete, &quot;/posts/1&quot;, :action =&gt; :destroy, :id =&gt; 1
-        #   should_route :get, &quot;/users/1/posts/1&quot;,
-        #     :action =&gt; :show, :id =&gt; 1, :user_id =&gt; 1
-        #
-        def should_route(method, path, options)
-          unless options[:controller]
-            options[:controller] = self.name.gsub(/ControllerTest$/, '').tableize
-          end
-          options[:controller] = options[:controller].to_s
-          options[:action] = options[:action].to_s
+      # Macro that creates a routing test. It tries to use the given HTTP
+      # +method+ on the given +path+, and asserts that it routes to the
+      # given +options+.
+      #
+      # If you don't specify a :controller, it will try to guess the controller
+      # based on the current test.
+      #
+      # +to_param+ is called on the +options+ given.
+      #
+      # Examples:
+      #
+      #   should_route :get, &quot;/posts&quot;, :controller =&gt; :posts, :action =&gt; :index
+      #   should_route :get, &quot;/posts/new&quot;, :action =&gt; :new
+      #   should_route :post, &quot;/posts&quot;, :action =&gt; :create
+      #   should_route :get, &quot;/posts/1&quot;, :action =&gt; :show, :id =&gt; 1
+      #   should_route :edit, &quot;/posts/1&quot;, :action =&gt; :show, :id =&gt; 1
+      #   should_route :put, &quot;/posts/1&quot;, :action =&gt; :update, :id =&gt; 1
+      #   should_route :delete, &quot;/posts/1&quot;, :action =&gt; :destroy, :id =&gt; 1
+      #   should_route :get, &quot;/users/1/posts/1&quot;,
+      #     :action =&gt; :show, :id =&gt; 1, :user_id =&gt; 1
+      #
+      def should_route(method, path, options)
+        unless options[:controller]
+          options[:controller] = self.name.gsub(/ControllerTest$/, '').tableize
+        end
+        options[:controller] = options[:controller].to_s
+        options[:action] = options[:action].to_s
 
-          populated_path = path.dup
-          options.each do |key, value|
-            options[key] = value.to_param if value.respond_to? :to_param
-            populated_path.gsub!(key.inspect, value.to_s)
-          end
+        populated_path = path.dup
+        options.each do |key, value|
+          options[key] = value.to_param if value.respond_to? :to_param
+          populated_path.gsub!(key.inspect, value.to_s)
+        end
 
-          should_name = &quot;route #{method.to_s.upcase} #{populated_path} to/from #{options.inspect}&quot;
+        should_name = &quot;route #{method.to_s.upcase} #{populated_path} to/from #{options.inspect}&quot;
 
-          should should_name do
-            assert_routing({:method =&gt; method, :path =&gt; populated_path}, options)
-          end
+        should should_name do
+          assert_routing({:method =&gt; method, :path =&gt; populated_path}, options)
         end
       end
     end</diff>
      <filename>lib/shoulda/controller/macros.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,236 +1,233 @@
-module ThoughtBot # :nodoc:
-  module Shoulda # :nodoc:
-    module Controller
-      # Formats tested by #should_be_restful.  Defaults to [:html, :xml]
-      VALID_FORMATS = Dir.glob(File.join(File.dirname(__FILE__), 'formats', '*.rb')).map { |f| File.basename(f, '.rb') }.map(&amp;:to_sym) # :doc:
-      VALID_FORMATS.each {|f| require &quot;shoulda/controller/formats/#{f}&quot;}
+module Shoulda # :nodoc:
+  module Controller
+    # Formats tested by #should_be_restful.  Defaults to [:html, :xml]
+    VALID_FORMATS = Dir.glob(File.join(File.dirname(__FILE__), 'formats', '*.rb')).map { |f| File.basename(f, '.rb') }.map(&amp;:to_sym) # :doc:
+    VALID_FORMATS.each {|f| require &quot;shoulda/controller/formats/#{f}&quot;}
+
+    # Actions tested by #should_be_restful
+    VALID_ACTIONS = [:index, :show, :new, :edit, :create, :update, :destroy] # :doc:
+
+    # A ResourceOptions object is passed into should_be_restful in order to configure the tests for your controller.
+    #
+    # Example:
+    #   class UsersControllerTest &lt; Test::Unit::TestCase
+    #     fixtures :all
+    #
+    #     def setup
+    #       ...normal setup code...
+    #       @user = User.find(:first)
+    #     end
+    #
+    #     should_be_restful do |resource|
+    #       resource.identifier = :id
+    #       resource.klass      = User
+    #       resource.object     = :user
+    #       resource.parent     = []
+    #       resource.actions    = [:index, :show, :new, :edit, :update, :create, :destroy]
+    #       resource.formats    = [:html, :xml]
+    #
+    #       resource.create.params = { :name =&gt; &quot;bob&quot;, :email =&gt; 'bob@bob.com', :age =&gt; 13}
+    #       resource.update.params = { :name =&gt; &quot;sue&quot; }
+    #
+    #       resource.create.redirect  = &quot;user_url(@user)&quot;
+    #       resource.update.redirect  = &quot;user_url(@user)&quot;
+    #       resource.destroy.redirect = &quot;users_url&quot;
+    #
+    #       resource.create.flash  = /created/i
+    #       resource.update.flash  = /updated/i
+    #       resource.destroy.flash = /removed/i
+    #     end
+    #   end
+    #
+    # Whenever possible, the resource attributes will be set to sensible defaults.
+    #
+    class ResourceOptions
+      # Configuration options for the create, update, destroy actions under should_be_restful
+      class ActionOptions
+        # String evaled to get the target of the redirection.
+        # All of the instance variables set by the controller will be available to the
+        # evaled code.
+        #
+        # Example:
+        #   resource.create.redirect  = &quot;user_url(@user.company, @user)&quot;
+        #
+        # Defaults to a generated url based on the name of the controller, the action, and the resource.parents list.
+        attr_accessor :redirect
 
-      # Actions tested by #should_be_restful
-      VALID_ACTIONS = [:index, :show, :new, :edit, :create, :update, :destroy] # :doc:
+        # String or Regexp describing a value expected in the flash.  Will match against any flash key.
+        #
+        # Defaults:
+        # destroy:: /removed/
+        # create::  /created/
+        # update::  /updated/
+        attr_accessor :flash
+
+        # Hash describing the params that should be sent in with this action.
+        attr_accessor :params
+      end
 
-      # A ResourceOptions object is passed into should_be_restful in order to configure the tests for your controller.
+      # Configuration options for the denied actions under should_be_restful
       #
       # Example:
-      #   class UsersControllerTest &lt; Test::Unit::TestCase
-      #     fixtures :all
-      #
-      #     def setup
-      #       ...normal setup code...
-      #       @user = User.find(:first)
+      #   context &quot;The public&quot; do
+      #     setup do
+      #       @request.session[:logged_in] = false
       #     end
       #
       #     should_be_restful do |resource|
-      #       resource.identifier = :id
-      #       resource.klass      = User
-      #       resource.object     = :user
-      #       resource.parent     = []
-      #       resource.actions    = [:index, :show, :new, :edit, :update, :create, :destroy]
-      #       resource.formats    = [:html, :xml]
-      #
-      #       resource.create.params = { :name =&gt; &quot;bob&quot;, :email =&gt; 'bob@bob.com', :age =&gt; 13}
-      #       resource.update.params = { :name =&gt; &quot;sue&quot; }
+      #       resource.parent = :user
       #
-      #       resource.create.redirect  = &quot;user_url(@user)&quot;
-      #       resource.update.redirect  = &quot;user_url(@user)&quot;
-      #       resource.destroy.redirect = &quot;users_url&quot;
-      #
-      #       resource.create.flash  = /created/i
-      #       resource.update.flash  = /updated/i
-      #       resource.destroy.flash = /removed/i
+      #       resource.denied.actions = [:index, :show, :edit, :new, :create, :update, :destroy]
+      #       resource.denied.flash = /get outta here/i
+      #       resource.denied.redirect = 'new_session_url'
       #     end
       #   end
       #
-      # Whenever possible, the resource attributes will be set to sensible defaults.
-      #
-      class ResourceOptions
-        # Configuration options for the create, update, destroy actions under should_be_restful
-        class ActionOptions
-          # String evaled to get the target of the redirection.
-          # All of the instance variables set by the controller will be available to the
-          # evaled code.
-          #
-          # Example:
-          #   resource.create.redirect  = &quot;user_url(@user.company, @user)&quot;
-          #
-          # Defaults to a generated url based on the name of the controller, the action, and the resource.parents list.
-          attr_accessor :redirect
-
-          # String or Regexp describing a value expected in the flash.  Will match against any flash key.
-          #
-          # Defaults:
-          # destroy:: /removed/
-          # create::  /created/
-          # update::  /updated/
-          attr_accessor :flash
-
-          # Hash describing the params that should be sent in with this action.
-          attr_accessor :params
-        end
-
-        # Configuration options for the denied actions under should_be_restful
+      class DeniedOptions
+        # String evaled to get the target of the redirection.
+        # All of the instance variables set by the controller will be available to the
+        # evaled code.
         #
         # Example:
-        #   context &quot;The public&quot; do
-        #     setup do
-        #       @request.session[:logged_in] = false
-        #     end
-        #
-        #     should_be_restful do |resource|
-        #       resource.parent = :user
-        #
-        #       resource.denied.actions = [:index, :show, :edit, :new, :create, :update, :destroy]
-        #       resource.denied.flash = /get outta here/i
-        #       resource.denied.redirect = 'new_session_url'
-        #     end
-        #   end
-        #
-        class DeniedOptions
-          # String evaled to get the target of the redirection.
-          # All of the instance variables set by the controller will be available to the
-          # evaled code.
-          #
-          # Example:
-          #   resource.create.redirect  = &quot;user_url(@user.company, @user)&quot;
-          attr_accessor :redirect
-
-          # String or Regexp describing a value expected in the flash.  Will match against any flash key.
-          #
-          # Example:
-          #   resource.create.flash = /created/
-          attr_accessor :flash
-
-          # Actions that should be denied (only used by resource.denied).  &lt;i&gt;Note that these actions will
-          # only be tested if they are also listed in +resource.actions+&lt;/i&gt;
-          # The special value of :all will deny all of the REST actions.
-          attr_accessor :actions
-        end
-
-        # Name of key in params that references the primary key.
-        # Will almost always be :id (default), unless you are using a plugin or have patched rails.
-        attr_accessor :identifier
-
-        # Name of the ActiveRecord class this resource is responsible for.  Automatically determined from
-        # test class if not explicitly set.  UserTest =&gt; &quot;User&quot;
-        attr_accessor :klass
-
-        # Name of the instantiated ActiveRecord object that should be used by some of the tests.
-        # Defaults to the underscored name of the AR class.  CompanyManager =&gt; :company_manager
-        attr_accessor :object
-
-        # Name of the parent AR objects.  Can be set as parent= or parents=, and can take either
-        # the name of the parent resource (if there's only one), or an array of names (if there's
-        # more than one).
+        #   resource.create.redirect  = &quot;user_url(@user.company, @user)&quot;
+        attr_accessor :redirect
+
+        # String or Regexp describing a value expected in the flash.  Will match against any flash key.
         #
         # Example:
-        #   # in the routes...
-        #   map.resources :companies do
-        #     map.resources :people do
-        #       map.resources :limbs
-        #     end
-        #   end
-        #
-        #   # in the tests...
-        #   class PeopleControllerTest &lt; Test::Unit::TestCase
-        #     should_be_restful do |resource|
-        #       resource.parent = :companies
-        #     end
-        #   end
-        #
-        #   class LimbsControllerTest &lt; Test::Unit::TestCase
-        #     should_be_restful do |resource|
-        #       resource.parents = [:companies, :people]
-        #     end
-        #   end
-        attr_accessor :parent
-        alias parents parent
-        alias parents= parent=
-
-        # Actions that should be tested.  Must be a subset of VALID_ACTIONS (default).
-        # Tests for each actionw will only be generated if the action is listed here.
-        # The special value of :all will test all of the REST actions.
-        #
-        # Example (for a read-only controller):
-        #   resource.actions = [:show, :index]
+        #   resource.create.flash = /created/
+        attr_accessor :flash
+
+        # Actions that should be denied (only used by resource.denied).  &lt;i&gt;Note that these actions will
+        # only be tested if they are also listed in +resource.actions+&lt;/i&gt;
+        # The special value of :all will deny all of the REST actions.
         attr_accessor :actions
+      end
 
-        # Formats that should be tested.  Must be a subset of VALID_FORMATS (default).
-        # Each action will be tested against the formats listed here.  The special value
-        # of :all will test all of the supported formats.
-        #
-        # Example:
-        #   resource.actions = [:html, :xml]
-        attr_accessor :formats
-
-        # ActionOptions object specifying options for the create action.
-        attr_accessor :create
-
-        # ActionOptions object specifying options for the update action.
-        attr_accessor :update
-
-        # ActionOptions object specifying options for the desrtoy action.
-        attr_accessor :destroy
-
-        # DeniedOptions object specifying which actions should return deny a request, and what should happen in that case.
-        attr_accessor :denied
-
-        def initialize # :nodoc:
-          @create  = ActionOptions.new
-          @update  = ActionOptions.new
-          @destroy = ActionOptions.new
-          @denied  = DeniedOptions.new
-
-          @create.flash  ||= /created/i
-          @update.flash  ||= /updated/i
-          @destroy.flash ||= /removed/i
-          @denied.flash  ||= /denied/i
-
-          @create.params  ||= {}
-          @update.params  ||= {}
-
-          @actions = VALID_ACTIONS
-          @formats = VALID_FORMATS
-          @denied.actions = []
-        end
-
-        def normalize!(target) # :nodoc:
-          @denied.actions  = VALID_ACTIONS if @denied.actions == :all
-          @actions         = VALID_ACTIONS if @actions        == :all
-          @formats         = VALID_FORMATS if @formats        == :all
-
-          @denied.actions  = @denied.actions.map(&amp;:to_sym)
-          @actions         = @actions.map(&amp;:to_sym)
-          @formats         = @formats.map(&amp;:to_sym)
-
-          ensure_valid_members(@actions,        VALID_ACTIONS, 'actions')
-          ensure_valid_members(@denied.actions, VALID_ACTIONS, 'denied.actions')
-          ensure_valid_members(@formats,        VALID_FORMATS, 'formats')
-
-          @identifier    ||= :id
-          @klass         ||= target.name.gsub(/ControllerTest$/, '').singularize.constantize
-          @object        ||= @klass.name.tableize.singularize
-          @parent        ||= []
-          @parent          = [@parent] unless @parent.is_a? Array
-
-          collection_helper = [@parent, @object.to_s.pluralize, 'url'].flatten.join('_')
-          collection_args   = @parent.map {|n| &quot;@#{object}.#{n}&quot;}.join(', ')
-          @destroy.redirect ||= &quot;#{collection_helper}(#{collection_args})&quot;
-
-          member_helper = [@parent, @object, 'url'].flatten.join('_')
-          member_args   = [@parent.map {|n| &quot;@#{object}.#{n}&quot;}, &quot;@#{object}&quot;].flatten.join(', ')
-          @create.redirect  ||= &quot;#{member_helper}(#{member_args})&quot;
-          @update.redirect  ||= &quot;#{member_helper}(#{member_args})&quot;
-          @denied.redirect  ||= &quot;new_session_url&quot;
-        end
-
-        private
-
-        def ensure_valid_members(ary, valid_members, name)  # :nodoc:
-          invalid = ary - valid_members
-          raise ArgumentError, &quot;Unsupported #{name}: #{invalid.inspect}&quot; unless invalid.empty?
-        end
+      # Name of key in params that references the primary key.
+      # Will almost always be :id (default), unless you are using a plugin or have patched rails.
+      attr_accessor :identifier
+
+      # Name of the ActiveRecord class this resource is responsible for.  Automatically determined from
+      # test class if not explicitly set.  UserTest =&gt; &quot;User&quot;
+      attr_accessor :klass
+
+      # Name of the instantiated ActiveRecord object that should be used by some of the tests.
+      # Defaults to the underscored name of the AR class.  CompanyManager =&gt; :company_manager
+      attr_accessor :object
+
+      # Name of the parent AR objects.  Can be set as parent= or parents=, and can take either
+      # the name of the parent resource (if there's only one), or an array of names (if there's
+      # more than one).
+      #
+      # Example:
+      #   # in the routes...
+      #   map.resources :companies do
+      #     map.resources :people do
+      #       map.resources :limbs
+      #     end
+      #   end
+      #
+      #   # in the tests...
+      #   class PeopleControllerTest &lt; Test::Unit::TestCase
+      #     should_be_restful do |resource|
+      #       resource.parent = :companies
+      #     end
+      #   end
+      #
+      #   class LimbsControllerTest &lt; Test::Unit::TestCase
+      #     should_be_restful do |resource|
+      #       resource.parents = [:companies, :people]
+      #     end
+      #   end
+      attr_accessor :parent
+      alias parents parent
+      alias parents= parent=
+
+      # Actions that should be tested.  Must be a subset of VALID_ACTIONS (default).
+      # Tests for each actionw will only be generated if the action is listed here.
+      # The special value of :all will test all of the REST actions.
+      #
+      # Example (for a read-only controller):
+      #   resource.actions = [:show, :index]
+      attr_accessor :actions
+
+      # Formats that should be tested.  Must be a subset of VALID_FORMATS (default).
+      # Each action will be tested against the formats listed here.  The special value
+      # of :all will test all of the supported formats.
+      #
+      # Example:
+      #   resource.actions = [:html, :xml]
+      attr_accessor :formats
+
+      # ActionOptions object specifying options for the create action.
+      attr_accessor :create
+
+      # ActionOptions object specifying options for the update action.
+      attr_accessor :update
+
+      # ActionOptions object specifying options for the desrtoy action.
+      attr_accessor :destroy
+
+      # DeniedOptions object specifying which actions should return deny a request, and what should happen in that case.
+      attr_accessor :denied
+
+      def initialize # :nodoc:
+        @create  = ActionOptions.new
+        @update  = ActionOptions.new
+        @destroy = ActionOptions.new
+        @denied  = DeniedOptions.new
+
+        @create.flash  ||= /created/i
+        @update.flash  ||= /updated/i
+        @destroy.flash ||= /removed/i
+        @denied.flash  ||= /denied/i
+
+        @create.params  ||= {}
+        @update.params  ||= {}
+
+        @actions = VALID_ACTIONS
+        @formats = VALID_FORMATS
+        @denied.actions = []
+      end
+
+      def normalize!(target) # :nodoc:
+        @denied.actions  = VALID_ACTIONS if @denied.actions == :all
+        @actions         = VALID_ACTIONS if @actions        == :all
+        @formats         = VALID_FORMATS if @formats        == :all
+
+        @denied.actions  = @denied.actions.map(&amp;:to_sym)
+        @actions         = @actions.map(&amp;:to_sym)
+        @formats         = @formats.map(&amp;:to_sym)
+
+        ensure_valid_members(@actions,        VALID_ACTIONS, 'actions')
+        ensure_valid_members(@denied.actions, VALID_ACTIONS, 'denied.actions')
+        ensure_valid_members(@formats,        VALID_FORMATS, 'formats')
+
+        @identifier    ||= :id
+        @klass         ||= target.name.gsub(/ControllerTest$/, '').singularize.constantize
+        @object        ||= @klass.name.tableize.singularize
+        @parent        ||= []
+        @parent          = [@parent] unless @parent.is_a? Array
+
+        collection_helper = [@parent, @object.to_s.pluralize, 'url'].flatten.join('_')
+        collection_args   = @parent.map {|n| &quot;@#{object}.#{n}&quot;}.join(', ')
+        @destroy.redirect ||= &quot;#{collection_helper}(#{collection_args})&quot;
+
+        member_helper = [@parent, @object, 'url'].flatten.join('_')
+        member_args   = [@parent.map {|n| &quot;@#{object}.#{n}&quot;}, &quot;@#{object}&quot;].flatten.join(', ')
+        @create.redirect  ||= &quot;#{member_helper}(#{member_args})&quot;
+        @update.redirect  ||= &quot;#{member_helper}(#{member_args})&quot;
+        @denied.redirect  ||= &quot;new_session_url&quot;
+      end
+
+      private
+
+      def ensure_valid_members(ary, valid_members, name)  # :nodoc:
+        invalid = ary - valid_members
+        raise ArgumentError, &quot;Unsupported #{name}: #{invalid.inspect}&quot; unless invalid.empty?
       end
     end
   end
 end
 
-</diff>
      <filename>lib/shoulda/controller/resource_options.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,8 @@
-module ThoughtBot # :nodoc:
-  module Shoulda # :nodoc:
-    module Helpers
-      # Prints a message to stdout, tagged with the name of the calling method.
-      def report!(msg = &quot;&quot;)
-        puts(&quot;#{caller.first}: #{msg}&quot;)
-      end
+module Shoulda # :nodoc:
+  module Helpers
+    # Prints a message to stdout, tagged with the name of the calling method.
+    def report!(msg = &quot;&quot;)
+      puts(&quot;#{caller.first}: #{msg}&quot;)
     end
   end
 end</diff>
      <filename>lib/shoulda/helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,74 +1,73 @@
 require 'shoulda/private_helpers'
 
-module ThoughtBot # :nodoc:
-  module Shoulda # :nodoc:
-    module Macros
-      # Macro that creates a test asserting a change between the return value
-      # of an expression that is run before and after the current setup block
-      # is run. This is similar to Active Support's &lt;tt&gt;assert_difference&lt;/tt&gt;
-      # assertion, but supports more than just numeric values.  See also
-      # should_not_change.
-      #
-      # Example:
-      #
-      #   context &quot;Creating a post&quot; do
-      #     setup { Post.create }
-      #     should_change &quot;Post.count&quot;, :by =&gt; 1
-      #   end
-      #
-      # As shown in this example, the &lt;tt&gt;:by&lt;/tt&gt; option expects a numeric
-      # difference between the before and after values of the expression.  You
-      # may also specify &lt;tt&gt;:from&lt;/tt&gt; and &lt;tt&gt;:to&lt;/tt&gt; options:
-      #
-      #   should_change &quot;Post.count&quot;, :from =&gt; 0, :to =&gt; 1
-      #   should_change &quot;@post.title&quot;, :from =&gt; &quot;old&quot;, :to =&gt; &quot;new&quot;
-      #
-      # Combinations of &lt;tt&gt;:by&lt;/tt&gt;, &lt;tt&gt;:from&lt;/tt&gt;, and &lt;tt&gt;:to&lt;/tt&gt; are allowed:
-      #
-      #   should_change &quot;@post.title&quot;                # =&gt; assert the value changed in some way
-      #   should_change &quot;@post.title&quot;, :from =&gt; &quot;old&quot; # =&gt; assert the value changed to anything other than &quot;old&quot;
-      #   should_change &quot;@post.title&quot;, :to   =&gt; &quot;new&quot; # =&gt; assert the value changed from anything other than &quot;new&quot;
-      def should_change(expression, options = {})
-        by, from, to = get_options!([options], :by, :from, :to)
-        stmt = &quot;change #{expression.inspect}&quot;
-        stmt &lt;&lt; &quot; from #{from.inspect}&quot; if from
-        stmt &lt;&lt; &quot; to #{to.inspect}&quot; if to
-        stmt &lt;&lt; &quot; by #{by.inspect}&quot; if by
+module Shoulda # :nodoc:
+  module Macros
+    # Macro that creates a test asserting a change between the return value
+    # of an expression that is run before and after the current setup block
+    # is run. This is similar to Active Support's &lt;tt&gt;assert_difference&lt;/tt&gt;
+    # assertion, but supports more than just numeric values.  See also
+    # should_not_change.
+    #
+    # Example:
+    #
+    #   context &quot;Creating a post&quot; do
+    #     setup { Post.create }
+    #     should_change &quot;Post.count&quot;, :by =&gt; 1
+    #   end
+    #
+    # As shown in this example, the &lt;tt&gt;:by&lt;/tt&gt; option expects a numeric
+    # difference between the before and after values of the expression.  You
+    # may also specify &lt;tt&gt;:from&lt;/tt&gt; and &lt;tt&gt;:to&lt;/tt&gt; options:
+    #
+    #   should_change &quot;Post.count&quot;, :from =&gt; 0, :to =&gt; 1
+    #   should_change &quot;@post.title&quot;, :from =&gt; &quot;old&quot;, :to =&gt; &quot;new&quot;
+    #
+    # Combinations of &lt;tt&gt;:by&lt;/tt&gt;, &lt;tt&gt;:from&lt;/tt&gt;, and &lt;tt&gt;:to&lt;/tt&gt; are allowed:
+    #
+    #   should_change &quot;@post.title&quot;                # =&gt; assert the value changed in some way
+    #   should_change &quot;@post.title&quot;, :from =&gt; &quot;old&quot; # =&gt; assert the value changed to anything other than &quot;old&quot;
+    #   should_change &quot;@post.title&quot;, :to   =&gt; &quot;new&quot; # =&gt; assert the value changed from anything other than &quot;new&quot;
+    def should_change(expression, options = {})
+      by, from, to = get_options!([options], :by, :from, :to)
+      stmt = &quot;change #{expression.inspect}&quot;
+      stmt &lt;&lt; &quot; from #{from.inspect}&quot; if from
+      stmt &lt;&lt; &quot; to #{to.inspect}&quot; if to
+      stmt &lt;&lt; &quot; by #{by.inspect}&quot; if by
 
-        expression_eval = lambda { eval(expression) }
-        before = lambda { @_before_should_change = expression_eval.bind(self).call }
-        should stmt, :before =&gt; before do
-          old_value = @_before_should_change
-          new_value = expression_eval.bind(self).call
-          assert_operator from, :===, old_value, &quot;#{expression.inspect} did not originally match #{from.inspect}&quot; if from
-          assert_not_equal old_value, new_value, &quot;#{expression.inspect} did not change&quot; unless by == 0
-          assert_operator to, :===, new_value, &quot;#{expression.inspect} was not changed to match #{to.inspect}&quot; if to
-          assert_equal old_value + by, new_value if by
-        end
+      expression_eval = lambda { eval(expression) }
+      before = lambda { @_before_should_change = expression_eval.bind(self).call }
+      should stmt, :before =&gt; before do
+        old_value = @_before_should_change
+        new_value = expression_eval.bind(self).call
+        assert_operator from, :===, old_value, &quot;#{expression.inspect} did not originally match #{from.inspect}&quot; if from
+        assert_not_equal old_value, new_value, &quot;#{expression.inspect} did not change&quot; unless by == 0
+        assert_operator to, :===, new_value, &quot;#{expression.inspect} was not changed to match #{to.inspect}&quot; if to
+        assert_equal old_value + by, new_value if by
       end
+    end
 
-      # Macro that creates a test asserting no change between the return value
-      # of an expression that is run before and after the current setup block
-      # is run. This is the logical opposite of should_change.
-      #
-      # Example:
-      #
-      #   context &quot;Updating a post&quot; do
-      #     setup { @post.update_attributes(:title =&gt; &quot;new&quot;) }
-      #     should_not_change &quot;Post.count&quot;
-      #   end
-      def should_not_change(expression)
-        expression_eval = lambda { eval(expression) }
-        before = lambda { @_before_should_not_change = expression_eval.bind(self).call }
-        should &quot;not change #{expression.inspect}&quot;, :before =&gt; before do
-          new_value = expression_eval.bind(self).call
-          assert_equal @_before_should_not_change, new_value, &quot;#{expression.inspect} changed&quot;
-        end
+    # Macro that creates a test asserting no change between the return value
+    # of an expression that is run before and after the current setup block
+    # is run. This is the logical opposite of should_change.
+    #
+    # Example:
+    #
+    #   context &quot;Updating a post&quot; do
+    #     setup { @post.update_attributes(:title =&gt; &quot;new&quot;) }
+    #     should_not_change &quot;Post.count&quot;
+    #   end
+    def should_not_change(expression)
+      expression_eval = lambda { eval(expression) }
+      before = lambda { @_before_should_not_change = expression_eval.bind(self).call }
+      should &quot;not change #{expression.inspect}&quot;, :before =&gt; before do
+        new_value = expression_eval.bind(self).call
+        assert_equal @_before_should_not_change, new_value, &quot;#{expression.inspect} changed&quot;
       end
+    end
 
-      private
+    private
 
-      include ThoughtBot::Shoulda::Private
-    end
+    include Shoulda::Private
   end
 end
+</diff>
      <filename>lib/shoulda/macros.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,20 @@
-module ThoughtBot # :nodoc:
-  module Shoulda # :nodoc:
-    module Private # :nodoc:
-      # Returns the values for the entries in the args hash who's keys are listed in the wanted array.
-      # Will raise if there are keys in the args hash that aren't listed.
-      def get_options!(args, *wanted)
-        ret  = []
-        opts = (args.last.is_a?(Hash) ? args.pop : {})
-        wanted.each {|w| ret &lt;&lt; opts.delete(w)}
-        raise ArgumentError, &quot;Unsupported options given: #{opts.keys.join(', ')}&quot; unless opts.keys.empty?
-        return *ret
-      end
+module Shoulda # :nodoc:
+  module Private # :nodoc:
+    # Returns the values for the entries in the args hash who's keys are listed in the wanted array.
+    # Will raise if there are keys in the args hash that aren't listed.
+    def get_options!(args, *wanted)
+      ret  = []
+      opts = (args.last.is_a?(Hash) ? args.pop : {})
+      wanted.each {|w| ret &lt;&lt; opts.delete(w)}
+      raise ArgumentError, &quot;Unsupported options given: #{opts.keys.join(', ')}&quot; unless opts.keys.empty?
+      return *ret
+    end
 
-      # Returns the model class constant, as determined by the test class name.
-      #
-      #   class TestUser; model_class; end =&gt; User
-      def model_class
-        self.name.gsub(/Test$/, '').constantize
-      end
+    # Returns the model class constant, as determined by the test class name.
+    #
+    #   class TestUser; model_class; end =&gt; User
+    def model_class
+      self.name.gsub(/Test$/, '').constantize
     end
   end
 end</diff>
      <filename>lib/shoulda/private_helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,34 +1,32 @@
-module Thoughtbot
-  module Shoulda
-    class &lt;&lt; self
-      attr_accessor :expected_exceptions
-    end
+module Shoulda
+  class &lt;&lt; self
+    attr_accessor :expected_exceptions
+  end
 
-    # Enables the core shoulda test suite to test for failure scenarios.  For
-    # example, to ensure that a set of test macros should fail, do this:
-    #
-    #   should_fail do
-    #     should_require_attributes :comments
-    #     should_protect_attributes :name
-    #   end
-    def should_fail(&amp;block)
-      context &quot;should fail when trying to run:&quot; do
-        Shoulda.expected_exceptions = [Test::Unit::AssertionFailedError]
-        yield block
-        Shoulda.expected_exceptions = nil
-      end
+  # Enables the core shoulda test suite to test for failure scenarios.  For
+  # example, to ensure that a set of test macros should fail, do this:
+  #
+  #   should_fail do
+  #     should_require_attributes :comments
+  #     should_protect_attributes :name
+  #   end
+  def should_fail(&amp;block)
+    context &quot;should fail when trying to run:&quot; do
+      Shoulda.expected_exceptions = [Test::Unit::AssertionFailedError]
+      yield block
+      Shoulda.expected_exceptions = nil
     end
+  end
 
-    class Context
-      # alias_method_chain hack to allow the should_fail macro to work
-      def should_with_failure_scenario(name, options = {}, &amp;block)
-        if Shoulda.expected_exceptions
-          expected_exceptions = Shoulda.expected_exceptions
-          failure_block = lambda { assert_raise(*expected_exceptions, &amp;block.bind(self)) }
-        end
-        should_without_failure_scenario(name, options, &amp;(failure_block || block))
+  class Context
+    # alias_method_chain hack to allow the should_fail macro to work
+    def should_with_failure_scenario(name, options = {}, &amp;block)
+      if Shoulda.expected_exceptions
+        expected_exceptions = Shoulda.expected_exceptions
+        failure_block = lambda { assert_raise(*expected_exceptions, &amp;block.bind(self)) }
       end
-      alias_method_chain :should, :failure_scenario
+      should_without_failure_scenario(name, options, &amp;(failure_block || block))
     end
+    alias_method_chain :should, :failure_scenario
   end
 end</diff>
      <filename>test/fail_macros.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require File.join(File.dirname(__FILE__), '..', 'test_helper')
 
 class PrivateHelpersTest &lt; Test::Unit::TestCase # :nodoc:
-  include ThoughtBot::Shoulda::Private
+  include Shoulda::Private
   context &quot;get_options!&quot; do
     should &quot;remove opts from args&quot; do
       args = [:a, :b, {}]</diff>
      <filename>test/other/private_helpers_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -119,21 +119,21 @@ class ShouldTest &lt; Test::Unit::TestCase # :nodoc:
 
   def test_should_create_a_new_context
     assert_nothing_raised do
-      Thoughtbot::Shoulda::Context.new(&quot;context name&quot;, self) do; end
+      Shoulda::Context.new(&quot;context name&quot;, self) do; end
     end
   end
 
   def test_should_create_a_nested_context
     assert_nothing_raised do
-      parent = Thoughtbot::Shoulda::Context.new(&quot;Parent&quot;, self) do; end
-      child  = Thoughtbot::Shoulda::Context.new(&quot;Child&quot;, parent) do; end
+      parent = Shoulda::Context.new(&quot;Parent&quot;, self) do; end
+      child  = Shoulda::Context.new(&quot;Child&quot;, parent) do; end
     end
   end
 
   def test_should_name_a_contexts_correctly
-    parent     = Thoughtbot::Shoulda::Context.new(&quot;Parent&quot;, self) do; end
-    child      = Thoughtbot::Shoulda::Context.new(&quot;Child&quot;, parent) do; end
-    grandchild = Thoughtbot::Shoulda::Context.new(&quot;GrandChild&quot;, child) do; end
+    parent     = Shoulda::Context.new(&quot;Parent&quot;, self) do; end
+    child      = Shoulda::Context.new(&quot;Child&quot;, parent) do; end
+    grandchild = Shoulda::Context.new(&quot;GrandChild&quot;, child) do; end
 
     assert_equal &quot;Parent&quot;, parent.full_name
     assert_equal &quot;Parent Child&quot;, child.full_name
@@ -143,7 +143,7 @@ class ShouldTest &lt; Test::Unit::TestCase # :nodoc:
   # Should statements
 
   def test_should_have_should_hashes_when_given_should_statements
-    context = Thoughtbot::Shoulda::Context.new(&quot;name&quot;, self) do
+    context = Shoulda::Context.new(&quot;name&quot;, self) do
       should &quot;be good&quot; do; end
       should &quot;another&quot; do; end
     end
@@ -155,7 +155,7 @@ class ShouldTest &lt; Test::Unit::TestCase # :nodoc:
   # setup and teardown
 
   def test_should_capture_setup_and_teardown_blocks
-    context = Thoughtbot::Shoulda::Context.new(&quot;name&quot;, self) do
+    context = Shoulda::Context.new(&quot;name&quot;, self) do
       setup    do; &quot;setup&quot;;    end
       teardown do; &quot;teardown&quot;; end
     end
@@ -167,7 +167,7 @@ class ShouldTest &lt; Test::Unit::TestCase # :nodoc:
   # building
 
   def test_should_create_shoulda_test_for_each_should_on_build
-    context = Thoughtbot::Shoulda::Context.new(&quot;name&quot;, self) do
+    context = Shoulda::Context.new(&quot;name&quot;, self) do
       should &quot;one&quot; do; end
       should &quot;two&quot; do; end
     end
@@ -178,7 +178,7 @@ class ShouldTest &lt; Test::Unit::TestCase # :nodoc:
 
   def test_should_create_test_methods_on_build
     tu_class = Test::Unit::TestCase
-    context = Thoughtbot::Shoulda::Context.new(&quot;A Context&quot;, tu_class) do
+    context = Shoulda::Context.new(&quot;A Context&quot;, tu_class) do
       should &quot;define the test&quot; do; end
     end
 
@@ -188,7 +188,7 @@ class ShouldTest &lt; Test::Unit::TestCase # :nodoc:
 
   def test_should_create_test_methods_on_build_when_subcontext
     tu_class = Test::Unit::TestCase
-    context = Thoughtbot::Shoulda::Context.new(&quot;A Context&quot;, tu_class) do
+    context = Shoulda::Context.new(&quot;A Context&quot;, tu_class) do
       context &quot;with a child&quot; do
         should &quot;define the test&quot; do; end
       end
@@ -203,21 +203,21 @@ class ShouldTest &lt; Test::Unit::TestCase # :nodoc:
   def test_should_create_a_new_context_and_build_it_on_Test_Unit_context
     c = mock(&quot;context&quot;)
     c.expects(:build)
-    Thoughtbot::Shoulda::Context.expects(:new).with(&quot;foo&quot;, kind_of(Class)).returns(c)
+    Shoulda::Context.expects(:new).with(&quot;foo&quot;, kind_of(Class)).returns(c)
     self.class.context &quot;foo&quot; do; end
   end
 
   def test_should_create_a_one_off_context_and_build_it_on_Test_Unit_should
     s = mock(&quot;test&quot;)
-    Thoughtbot::Shoulda::Context.any_instance.expects(:should).with(&quot;rock&quot;, {}).returns(s)
-    Thoughtbot::Shoulda::Context.any_instance.expects(:build)
+    Shoulda::Context.any_instance.expects(:should).with(&quot;rock&quot;, {}).returns(s)
+    Shoulda::Context.any_instance.expects(:build)
     self.class.should &quot;rock&quot; do; end
   end
 
   def test_should_create_a_one_off_context_and_build_it_on_Test_Unit_should_eventually
     s = mock(&quot;test&quot;)
-    Thoughtbot::Shoulda::Context.any_instance.expects(:should_eventually).with(&quot;rock&quot;).returns(s)
-    Thoughtbot::Shoulda::Context.any_instance.expects(:build)
+    Shoulda::Context.any_instance.expects(:should_eventually).with(&quot;rock&quot;).returns(s)
+    Shoulda::Context.any_instance.expects(:build)
     self.class.should_eventually &quot;rock&quot; do; end
   end
 </diff>
      <filename>test/other/should_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5ede0097ecf4a67c3ff4f50031f7317a5565087e</id>
    </parent>
  </parents>
  <author>
    <name>Mathieu Martin</name>
    <email>webmat@gmail.com</email>
  </author>
  <url>http://github.com/thoughtbot/shoulda/commit/5c1329f6b9068c879d3d3182610b992c64ba2519</url>
  <id>5c1329f6b9068c879d3d3182610b992c64ba2519</id>
  <committed-date>2009-01-05T08:50:57-08:00</committed-date>
  <authored-date>2009-01-05T08:50:57-08:00</authored-date>
  <message>Removed all ThoughtBot (and Thoughtbot) namespaces</message>
  <tree>35a1be18ca69d0cbc7ea1bcec288bd5c0df3b18f</tree>
  <committer>
    <name>Mathieu Martin</name>
    <email>webmat@gmail.com</email>
  </committer>
</commit>
