I explicitly set a controller for a resource and now run in to routing
problems trying to reference it in my functional test.
For example:
=== routes.rb ===
map.resources :companies do |companies|
companies.resources :sent_items, :name_prefix =>
“company_”, :controller => :company_sent_items
end
=== company_sent_items_controller_test.rb ===
def test_should_get_index
get :index, :company_id => users(:john_deere).company.id
assert_whatever
end
I get the following routing error:
test_get_index(CompanySentItemsControllerTest):
ActionController::RoutingError: No route matches
{:controller=>“company_sent_items”, :action=>“index”}
Without making map.connect mappings for the the
CompanySentItemsController how do I form a get request for that
resource?
Thanks,
Jake