[rspec-users] Difference between spec:server and autospec

Scott Taylor scott at railsnewbie.com
Thu Jun 4 04:14:57 EDT 2009


Hunt Jon wrote:
> Thanks Scott.
>
> I don't get what happens if I add --drb
> to spec/spec.opts
> files.
>   

If you add --drb to your spec.opts (or you run script/spec --drb 
spec/my_spec.rb) - you will run your specs through the spec server. 

Without --drb, rails will load up in a fresh process.

The *whole point* of the drb server is to speed up load time when 
running specs.

Just to give you an idea, here's the difference for me (with spork 
instead of the spec server):

http://screencast.com/t/qhRvqiXc

Scott
> Can anybody explain to me, please?
>
> On Thu, Jun 4, 2009 at 3:24 PM, Scott Taylor <scott at railsnewbie.com> wrote:
>   
>> Hunt Jon wrote:
>>     
>>> What's the difference between spec:server and autospec?
>>>
>>>
>>>       
>> I wouldn't recommend using spec server - use spork instead:
>>
>> http://github.com/timcharper/spork/tree/master
>>
>> Both load the rails environment, so that each time you run your tests (with
>> script/spec -X or script/spec --drb) you won't have to wait for it to load
>> up (which can take 4-5 seconds).
>>
>> autospec/autotest, on the other hand, polls the filesystem every 3 seconds
>> or so for changes.  When it sees one, it reruns just the test or spec file
>> which has changed.
>>
>> Scott
>>
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://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