# Self.use\_instantiated\_fixtures

**URL:** <https://www.ruby-forum.com/t/self-use-instantiated-fixtures/71690>\
**Category:** Rails\
**Created:** [February 22, 2006, 2:55am UTC](https://www.ruby-forum.com/t/self-use-instantiated-fixtures/71690 "2006-02-22T02:55:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![crucoba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Post date:** [February 22, 2006, 2:55am UTC](https://www.ruby-forum.com/t/self-use-instantiated-fixtures/71690/1 "2006-02-22T02:55:43Z")

</div>

Can this be controlled on a per TestCase basis, or is it only a global  
setting?

David

---

<div class="post-metadata">

**Author:** ![crucoba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Post date:** [February 23, 2006, 11:28am UTC](https://www.ruby-forum.com/t/self-use-instantiated-fixtures/71690/2 "2006-02-23T11:28:00Z")

</div>

From a 10 seconds glance at the code my guess would be that you can’t  
set it to different values for each test very easily, but, you can  
probably call instantiate\_fixtures from inside a test to instantiate the  
fixtures. Untested.

-Jonny.

David C. wrote:

> Can this be controlled on a per TestCase basis, or is it only a global  
> setting?
> 
> David

---

<div class="post-metadata">

**Author:** ![crucoba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Post date:** [February 24, 2006, 6:46pm UTC](https://www.ruby-forum.com/t/self-use-instantiated-fixtures/71690/3 "2006-02-24T18:46:20Z")

</div>

It gets set in the Test::Unit::TestCase portion of the test\_helper.rb  
file, so apparently you should be able to do it on a per TestCase  
basis.

The best way to find these things out is to give them a shot 🙂

Pat
