diff --git a/lib/friendly_id.rb b/lib/friendly_id.rb
index <HASH>..<HASH> 100644
--- a/lib/friendly_id.rb
+++ b/lib/friendly_id.rb
@@ -55,7 +55,12 @@ module FriendlyId
     def enable
       return if ActiveRecord::Base.methods.include? 'has_friendly_id'
       ActiveRecord::Base.class_eval { extend FriendlyId::ClassMethods }
-      Test::Unit::TestCase.class_eval { include FriendlyId::ShouldaMacros }
+
+      if Rails.version >= "2.3" 
+        ActiveSupport::TestCase.class_eval { include FriendlyId::ShouldaMacros }
+      else
+        Test::Unit::TestCase.class_eval { include FriendlyId::ShouldaMacros }
+      end
     end
 
   end
@@ -64,4 +69,4 @@ end
 
 if defined?(ActiveRecord)
   FriendlyId::enable
-end
\ No newline at end of file
+end
Load Shoulda macros in ActiveSupport::TestCase for Rails <I>.