Forum: RSpec Difference between spec:server and autospec

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9239e324751b8db551789e5e16689438?d=identicon&s=25 Hunt Jon (Guest)
on 2009-06-04 08:19
(Received via mailing list)
What's the difference between spec:server and autospec?

I understand spec:server is only for a Rails project while autospec
can work with any projects.

I read
http://wiki.github.com/dchelimsky/rspec/spec_serve...
but couldn't understand it.

I leave autotest/autospec running during the development.
"autotest-fsevent" is very
helpful for me, a Mac user.

Do we use both at the same time for Rails projects?

Jon
369b9fd2a0d9e7cdbc60907a2a056ad9?d=identicon&s=25 Scott Taylor (Guest)
on 2009-06-04 08:33
(Received via mailing list)
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
9239e324751b8db551789e5e16689438?d=identicon&s=25 Hunt Jon (Guest)
on 2009-06-04 09:47
(Received via mailing list)
Thanks Scott.

I don't get what happens if I add --drb
to spec/spec.opts
files.

Can anybody explain to me, please?
369b9fd2a0d9e7cdbc60907a2a056ad9?d=identicon&s=25 Scott Taylor (Guest)
on 2009-06-04 10:17
(Received via mailing list)
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
This topic is locked and can not be replied to.