1

I have just switched from using Spork with Guard to using Zeus

I used this step by step guide: http://blog.blenderbox.com/2014/04/10/testing-rails-3-with-guard-and-zeus/

The thing, is now my routine is

  • in a terminal window do $ zeus start

  • in another terminal window: guard

  • in another window : $rspec

My tests are working fine but I'm very surprised that rspec test suite has gotten slower than with Spork as most people say it's a huge boost in test speed.

What also makes me really think there's a bug is that when I type rspec, it displays a message reading what's below before running tests:

No DRb server is running. Running in local process instead

Somebody got an idea what's the problem ?

thanks

guardfile

require 'active_support/core_ext'

require 'active_support/inflector'

# NEw ZEUS guard
# source - blog.blenderbox.com/2014/04/10/testing-rails-3-with-guard-and-zeus/
guard 'zeus-client', :all_on_start => false, :all_after_pass => false do
  ignore %r{^\.zeus\.sock$}

  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^lib/(.+)\.rb$})                           { |m| "spec/lib/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')                        { "spec" }

  # Rails example
  watch(%r{^app/(.+)\.rb$})                           { |m| "spec/#{m[1]}_spec.rb" }
  watch(%r{^app/(.*)(\.erb|\.haml)$})                 { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
  watch(%r{^app/controllers/(.+)_(controller)\.rb$})  { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
  watch(%r{^spec/support/(.+)\.rb$})                  { "spec" }
  watch('config/routes.rb')                           { "spec/routing" }
  watch('app/controllers/application_controller.rb')  { "spec/controllers" }

  # Capybara features specs
  watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$})     { |m| "spec/features/#{m[1]}_spec.rb" }

guard 'rails-assets', :run_on => [:start, :change] do
  watch(%r{^app/assets/.+$})
  watch('config/application.rb')  
end
Mathieu
  • 4,587
  • 11
  • 57
  • 112
  • Have you removed `Spork` completely? Sounds like remnants are still in `spec/spec_helper.rb`. Make sure your config for `rspec` in your `Guardfile` looks something like `guard :rspec, cmd: "zeus rspec"`. If you're on `Rails 4`, try `spring` instead, which is a replacement for `zeus`. – Damien Roche Jun 07 '14 at 15:31
  • @DamienRoche tx for the answer. merci:) i think spork has been removed evrywhere (maybe not in gemfile lock but i don't think it matters). i have put in my quesityon guardfile: should i add in this file as you said: guard :rspec, cmd: "zeus rspec" ? haha so much pain to switch to zeus...i'll wait a little before sphinx:) – Mathieu Jun 07 '14 at 15:40
  • My opinion is you should remove `zeus`, too, and use the default app preloader (`spring`) that comes with `Rails 4`. – Damien Roche Jun 07 '14 at 15:42
  • :) haha hard to throw hours... – Mathieu Jun 07 '14 at 15:43

1 Answers1

9

You may have the --drb option set in your .rspec file. Delete that line.

Simon Peck
  • 507
  • 3
  • 8
  • amazing! thanks, it's so undocumented on the web that I tried to ype rspec --drb and nobody talks about this but what you proposed worked! – Mathieu Nov 24 '14 at 20:55
  • i don't even know what --drb was supposed to help me to – Mathieu Nov 24 '14 at 20:55