# Trouble loading fixtures for name-spaced model in tests

**URL:** <https://www.ruby-forum.com/t/trouble-loading-fixtures-for-name-spaced-model-in-tests/84378>\
**Category:** Rails\
**Created:** [February 3, 2007, 8:08pm UTC](https://www.ruby-forum.com/t/trouble-loading-fixtures-for-name-spaced-model-in-tests/84378 "2007-02-03T20:08:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [February 3, 2007, 8:08pm UTC](https://www.ruby-forum.com/t/trouble-loading-fixtures-for-name-spaced-model-in-tests/84378/1 "2007-02-03T20:08:14Z")

</div>

Hi, I had to wrap a model in a module to work around a name conflict.  
Now my model is MyApp::Country instead of Country. I also renamed the  
table to ‘myapp\_countries’ and used set\_table\_name ‘myapp\_countries’ in  
my model. Now my app works just fine with this, but I am having trouble  
getting my fixtures to load in my functional and unit tests. I renamed  
the countries fixture to ‘myapp\_countries.yml’, and used ‘fixtures  
:myapp\_countries’ in the tests but I keep getting the following errror:  
‘FixtureClassNotFound: The class “MyappCountry” was not found.’ Any  
ideas how to make this work? Thanks! Ingo

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [February 6, 2007, 11:30am UTC](https://www.ruby-forum.com/t/trouble-loading-fixtures-for-name-spaced-model-in-tests/84378/2 "2007-02-06T11:30:57Z")

</div>

Try posting your question on [refwell.com](http://refwell.com). You might get your answer  
there  
James

On Feb 3, 8:08 pm, Ingo W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
