functional testing joins table problem

I have models/controllers

Class Facility   has_many :facilities_services, :dependent => :delete_all

Class Service   has_many :facilities_services, :dependent => :delete_all

Class FacilitiesServices   belongs_to :facility   belongs_to :service

so in my test/functional/facilities_controller_test.rb, I have

  post :destroy, :id => 5

which tosses an error...

test_destroy(FacilitiesControllerTest): NameError: uninitialized constant Facility::FacilitiesService     /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:477:in `const_missing'     (eval):1:in `configure_dependency_for_has_many'

Is this because the Model for the join table should have been, FacilitiesService ?

Craig

Yes. Looks that way.

Yes. Looks that way.

> I have models/controllers > > Class Facility > has_many :facilities_services, :dependent => :delete_all > > Class Service > has_many :facilities_services, :dependent => :delete_all > > Class FacilitiesServices > belongs_to :facility > belongs_to :service > > so in my test/functional/facilities_controller_test.rb, I have > > post :destroy, :id => 5 > > which tosses an error... > > test_destroy(FacilitiesControllerTest): > NameError: uninitialized constant Facility::FacilitiesService > /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:477:in `const_missing' > (eval):1:in `configure_dependency_for_has_many' > > Is this because the Model for the join table should have been, > FacilitiesService ?