# fixtures using wrong database table

**URL:** <https://discuss.rubyonrails.org/t/fixtures-using-wrong-database-table/17444>\
**Category:** rubyonrails-talk\
**Created:** [August 26, 2007, 9:41pm UTC](https://discuss.rubyonrails.org/t/fixtures-using-wrong-database-table/17444 "2007-08-26T21:41:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_J\_Botta1](https://avatars.discourse-cdn.com/v4/letter/c/3da27b/32.png) [@Christopher\_J\_Botta1](https://discuss.rubyonrails.org/u/Christopher_J_Botta1)\
**Post date:** [August 26, 2007, 9:41pm UTC](https://discuss.rubyonrails.org/t/fixtures-using-wrong-database-table/17444/1 "2007-08-26T21:41:12Z")

</div>

Hello,

I have a model that sets it's table\_name to something: MyModel \< ActiveRecord::Base &nbsp;&nbsp;self.table\_name = 'some\_funky\_table' end

Now when I try to run the unit test for it: ruby tests/unit/my\_model\_test.rb

I get an error: relation "my\_models" does not exist

How can I get the fixtures to recognize that I'm using a model with an overridden table\_name attribute?

Thank you for the help.
