Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[patch] fix routing for actionpack tests - 1.9.2 compatibility

#3279

Found some odd behaviour, trying to run actionpack tests on ruby 1.9.2dev using rails master -- many of routing tests were failing.

So, I had to patch abstract_unit.rb :

diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index aef3dd6..96d0e6e 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -123,8 +123,8 @@ class ::ApplicationController < ActionController::Base
 end

 module ActionController
-  class << Routing
-    def possible_controllers
+  module Routing
+    def self.possible_controllers
       @@possible_controllers ||= []
     end
   end

otherwise, ActionController::Routing.possible_controllers returned always a new, empty Array object, so route recognition regexp never was constructed properly.

Reported by Nikolai Lugovoi · September 27th, 2009 @ 07:33 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Nikolai Lugovoi
    Nikolai Lugovoi
    • Tag changed from 3.0, routing, ruby1.9.2, test to 3.0, routing, ruby1.9.2, test

    Added patch with few other places in actionpack, so tests pass on 1.8.7 and 1.9.2dev

    September 28th, 2009 @ 12:01 AM

  2. Andrew White
    Andrew White
    • State changed from new to invalid
    • Importance changed from to Low

    Routing tests for 2-3-stable and master appear to run fine on 1.9.2

    July 4th, 2010 @ 08:36 AM