On Mar 29, 2008, at 11:11 PM, David Beckwith wrote:

> Just to help clarify for the newbies like me.  script/spec_server runs
> in conjunction with script/spec but not ruby your_spec.rb.  It seems
> like the way to use script/spec_server is to have 2 console programs
> open:
>
>  ruby script/spec_server
>
> That will have the spec_server running in the background and your
> entire application loaded into memory at the time of execution, and
> since it's on top of once console it will be easy to kill and restart
> when you need to.  If you make changes to your application that are
> loaded up only in the beginning (like installing a new plugin), then
> you'll have to restart spec_server.  (Q: What about the following
> cases:
> make a database schema change,
> add another user-defined model,
> add another controller,
> edit an existing controller,
> edit an existing model
> make changes to your routes.rb file,
> edit a plugin.
> For which of those cases do you have to restart spec_server and which
> cases don't you? )
>
> And in another console run the spec you're working on:
>
>  ruby script/spec spec/models/your_spec.rb --drb -c
>
> I've noticed that autotest doesn't send commands to the spec_server.
> Instead it reloads the entire Rails environment and your application's
> plugins everytime it executes.  This causes autotest to run
> significantly slower than script server, because when you run the
> script/spec command the specs are sent to the spec_server which
> already has your Rails environment fired up and ready to go.  If you
> happen to install a new plugin or something like that, then you'll
> have to restart the spec_server.

No - It should work - Remember: Autotest is DUMB.  Dumb, dumb, dumb.    
It's a great tool, but it was written before rspec.  It has nothing to  
do with rspec.  All it does is watch a series of files, and reruns a  
certain command when one of those files changes.

So - Autotest has no knowledge of the internals of Rspec.  The BUG was  
that if you put the --drb (or the equivalent -X) flag in your  
spec.opts file, Rspec would not run them with the drb server.  This  
bug has been fixed in trunk (as far as I know).

Scott

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to