myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2826] branches/rails2/test/test_helper.rb: fixed


From: noreply
Subject: [myexperiment-hackers] [2826] branches/rails2/test/test_helper.rb: fixed url generation issue in the test harness
Date: Fri, 18 Nov 2011 10:03:00 -0500 (EST)

Revision
2826
Author
dgc
Date
2011-11-18 10:03:00 -0500 (Fri, 18 Nov 2011)

Log Message

fixed url generation issue in the test harness

Modified Paths

Diff

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
+

reply via email to

[Prev in Thread] Current Thread [Next in Thread]