Frederick Cheung wrote:
> On Jun 15, 9:05�am, nico Itkin <[email protected]>
> wrote:
>> Frederick Cheung wrote:
> 
>> Thanks Fred for your help,
>>
>> I guess you're right, do you know a nice way to force constant_cache to
>> be run before each test ?
>>
>> Otherwise I think i'll try to prevent rake to prepare db before running
>> tests, but i'm not sure this is an optimal solution to my pb.
> 
> 
> it's not actually the running the tests that does it, it's when the
> model is loaded  (since that is when cache_constants is called). I'm
> not sure you current setup method does anything since (best case
> scenario) it causes a file to be loaded that adds some methods to
> activerecord classes (but doesn't actually call them). You could try
> calling Status.cache_constants from your setup method.
> 
> Fred

it works !!!

thanks a lot Fred ! Itkin
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to