# Automated test for links between models

**URL:** <https://www.ruby-forum.com/t/automated-test-for-links-between-models/111275>\
**Category:** Rails\
**Created:** [August 4, 2007, 7:20pm UTC](https://www.ruby-forum.com/t/automated-test-for-links-between-models/111275 "2007-08-04T19:20:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@michau](https://www.ruby-forum.com/u/michau)\
**Post date:** [August 4, 2007, 7:20pm UTC](https://www.ruby-forum.com/t/automated-test-for-links-between-models/111275/1 "2007-08-04T19:20:45Z")

</div>

Hey, I’ve got plenty of models that are interconnected by methods:

belongs\_to  
has\_many  
has\_one  
and :through

I’ve created all of the models first, and now I have the headache to  
test that all of the links work properly. I’ve been wondering if  
there’s any gem or plugin that would do it automatically? By just  
specifying the links with some meta language and than it would  
automatically build all the tests?  
Any suggestions?

Cheers,

michau
