Modified: branches/rails2/test/test_helper.rb (2825 => 2826)
--- branches/rails2/test/test_helper.rb 2011-11-18 15:01:18 UTC (rev 2825)
+++ branches/rails2/test/test_helper.rb 2011-11-18 15:03:00 UTC (rev 2826)
@@ -40,3 +40,19 @@
@request.session[:user_id] = user ? users(user).id : nil
end
end
+
+if Rails::VERSION::MAJOR > 1
+ module ActionController
+ module UrlWriter
+
+ alias_method :original_url_for, :url_for
+
+ def url_for(options)
+ options[:host] = "test.host"
+ original_url_for(options)
+ end
+
+ end
+ end
+end
+