ruby on rails - undefined method relative_url_root for nil:NilClass when running rspec on namespaced controller -


i'm working on rails 2.3.18 3.2.x upgrade, , i've run problem 1 set of controller tests:

error:

/actionpack-3.2.12/lib/action_controller/test_case.rb:514:in `build_request_uri' /actionpack-3.2.12/lib/action_controller/test_case.rb:470:in `process' /actionpack-3.2.12/lib/action_controller/test_case.rb:49:in `process' /actionpack-3.2.12/lib/action_controller/test_case.rb:390:in `get' # ./spec/controllers/integrations/formstack_controller_spec.rb:104:in `block (3 levels) in <top (required)>' 

code triggering error:

it "should handle failed access_token retreival"     formstack::oauth2connection.any_instance.stub(:identify).and_return(nil)     "oauth_token"   # line <---------------------------------------------------------------- 104     response.should redirect_to(:controller => "/integrations/", :action => :index)     flash[:error].should include("error") end 

the routes controller:

namespace :integrations, path: "/integrations"     match "formstack/oauth_token", :to => "formstack#oauth_token"     resources :formstack end 

nothing special controller:

class integrations::formstackcontroller < applicationcontroller     def oauth_token        ...     end end 

so about

get "any_action_in_this_controller" 

causes relative_url_root error? every test every action controller bringing error.

what other information can give guys me debug this?

as mentioned @marcario, if have:

    def config     end 

in controller, (obscure) error. rename config else , route mapping match , you're go.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -