[rspec-users] spec_server not reloading model classes

Scott Taylor scott at railsnewbie.com
Sun Mar 29 04:40:49 EDT 2009


Andrew Vit wrote:
> I just tried it with:
>
> $ rake RAILS_ENV=development spec:server:start
> $ RAILS_ENV=development script/autospec
>   

Actually I meant poking around your app with a browser in dev mode ;)

I'm pretty sure that rails will still try to run the test environment, 
even with RAILS_ENV set to a different value, anyway.
> And it looks the same. (If I change the model file, the tests re-run
> but it obviously doesn't get reloaded: even if I add a syntax error,
> it still runs.)
>
> Not sure where you mean about the explicit require. All my specs files
> have require spec_helper at the top, which is how they come out of the
> box...
>   
I was thinking of any explicit requires which may occur in app/ and lib/.

AFAIK, this is more of a rails loading issue than an rspec one.

Scott


> Thanks for your help,
> Andrew
>
>
>
> On Mar 29, 12:12 am, Scott Taylor <sc... at railsnewbie.com> wrote:
>   
>> Andrew Vit wrote:
>>     
>>> Hi,
>>>       
>>> I'm using the latest rspec-rails 1.2.2 with rails 2.3.2, and I'm
>>> trying to get it to work with spec_server. This is on Mac/Leopard,
>>> with the stock ruby, all gems installed in /Library/Ruby/. I have
>>> configured:
>>>       
>>> # config/environments/test.rb
>>> config.cache_classes = false
>>>       
>>> # spec/spec.opts
>>> --drb
>>>       
>> Do you notice reloading occurring in dev mode (with cache-classes =
>> false) with the same class?
>>
>> Are you explicitly using require anywhere?
>>
>> Scott
>>
>>
>>
>>
>>
>>     
>>> The tests run nice and fast, so I know they're running against the
>>> spec_server, but when I make a change to my model which should toggle
>>> the result of a test, it doesn't change until I restart the
>>> spec:server. I have tried running it with combinations of:
>>>       


>>> rake spec:server:start
>>> script/spec_server
>>>       
>>> script/autospec
>>> autospec
>>>       
>>> The specs run, but no reloading makes it useless. Any ideas?
>>>       
>>> Thanks,
>>> Andrew Vit
>>> _______________________________________________
>>> rspec-users mailing list
>>> rspec-us... at rubyforge.org
>>> http://rubyforge.org/mailman/listinfo/rspec-users
>>>       
>> _______________________________________________
>> rspec-users mailing list
>> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
>>     
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>   



More information about the rspec-users mailing list