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