I’ve written about my integration testing setup: Capybara, PhantomJs, Poltergeist, and Rspec Tips. For a while, I’ve been eager to upgrade to Rails 4.1 and RSpec 3. Finally, in August, 2014, the gem ecosystem allowed this to happen! I’ve got a related article on my tips for upgrading to Rails 4.1 and RSpec 3.
Once I had upgraded nearly every gem in my client’s large Rails project to the latest gem versions, I was pleasantly surprised that I could once again get Zeus, Guard, RSpec, Capybara, Poltergeist, Parallel Tests, etc. to all play nicely together.
Always curious as to the value of the latest defaults in Rails, I decided to try out Spring. Both Spring and Zeus preload Rails so that you don’t have to pay the same start up cost for evry test run. Here’s a RailsCast on the topic: #412 Fast Rails Commands.
The end results is that both Zeus and Spring give great results and are very
similar in many ways. The biggest difference for me is that only Zeus (and not
Spring) works with Parallel Tests. Interestingly, I got very similar results
when using Parallel Tests with our without Zeus. It turns out that it is
possible to run Parallel Tests with Spring installed so long as you disable it
by setting the environment variable like this: DISABLE_SPRING=TRUE parallel_rspec -n 6 spec
.
The bottom line for me is that I don’t have any good reason to move away from Zeus to Spring, and the fact that Spring is part of stock Rails is not a sufficient reason for me. That being said, on another project which is smaller, I’m not motivated to switch from Spring to Zeus.
This is a companion discussion topic for the original entry at http://www.railsonmaui.com//blog/2014/09/10/fast-tests-comparing-zeus-with-spring-on-rails-4-dot-1/