Forum: Ruby on Rails Testing association definitions...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eric N. (Guest)
on 2006-06-11 00:06
(Received via mailing list)
Are there best practices for testing that the model class declares
the appropriate association linkages?   Similarly are there good ways
to test that the model has declared desired acts_as_[list |  tree]?

My first thought was to simply test if the model respond_to? either a
characteristic method of the association or even a more complete list
of methods.  This would seem to be in-line with duck-typing, but it
also feels a little cumbersome.  So how do you test-drive your
association linkages?

Eric
This topic is locked and can not be replied to.