Jonathan del Strother
2006-Sep-04 11:23 UTC
Can''t get absolute urls working in this functional test
I''ve created a new rails project, and for some reason absolute urls aren''t working in my functional test. I have an AssetsController, and am using map.resources :assets. localhost:3000/assets works fine. In my functional testing, "get :index" works fine, but anything using absolute urls (get ''/assets'', get assets_url, get ''/assets/ index'') fails with the following error: test_index(AssetsControllerTest): ActionController::UnknownAction: No action responded to http:// test.host/assets /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ actionpack/lib/action_controller/filters.rb:363:in `perform_action_without_benchmark'' /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'' /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ actionpack/lib/action_controller/rescue.rb:81:in `perform_action'' /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ actionpack/lib/action_controller/base.rb:410:in `process_without_filters'' /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ actionpack/lib/action_controller/filters.rb:372:in `process_without_session_management_support'' /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ actionpack/lib/action_controller/session_management.rb:114:in `process_without_test'' /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ actionpack/lib/action_controller/test_process.rb:15:in `process'' /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ actionpack/lib/action_controller/test_process.rb:369:in `process'' /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ actionpack/lib/action_controller/test_process.rb:340:in `get'' test/functional/assets_controller_test.rb:17:in `test_index'' I know this works fine in my other rails apps, but I''ve been staring at this for 2 hours without getting anywhere. Any suggestions? Jon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Jonathan del Strother
2006-Sep-05 16:36 UTC
Re: Can''t get absolute urls working in this functional test
On 4 Sep 2006, at 12:23, Jonathan del Strother wrote:> I''ve created a new rails project, and for some reason absolute urls > aren''t working in my functional test. > > I have an AssetsController, and am using map.resources :assets. > localhost:3000/assets works fine. > > In my functional testing, "get :index" works fine, but anything > using absolute urls (get ''/assets'', get assets_url, get ''/assets/ > index'') fails with the following error: > > test_index(AssetsControllerTest): > ActionController::UnknownAction: No action responded to http:// > test.host/assets > /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ > actionpack/lib/action_controller/filters.rb:363:in > `perform_action_without_benchmark'' > /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ > actionpack/lib/action_controller/benchmarking.rb:66:in > `perform_action_without_rescue'' > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' > /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ > actionpack/lib/action_controller/benchmarking.rb:66:in > `perform_action_without_rescue'' > /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ > actionpack/lib/action_controller/rescue.rb:81:in `perform_action'' > /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ > actionpack/lib/action_controller/base.rb:410:in > `process_without_filters'' > /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ > actionpack/lib/action_controller/filters.rb:372:in > `process_without_session_management_support'' > /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ > actionpack/lib/action_controller/session_management.rb:114:in > `process_without_test'' > /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ > actionpack/lib/action_controller/test_process.rb:15:in `process'' > /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ > actionpack/lib/action_controller/test_process.rb:369:in `process'' > /Users/jon/Developer/MillicentAssets/config/../vendor/rails/ > actionpack/lib/action_controller/test_process.rb:340:in `get'' > test/functional/assets_controller_test.rb:17:in `test_index'' > > > > I know this works fine in my other rails apps, but I''ve been staring > at this for 2 hours without getting anywhere. Any suggestions?Anyone?