I was having some problem with zeus + rspec and the solution I found says that I must to delete require 'rspec/autorun'
from spec_helper.rb
.
That worked great, but I was wondering what's the utility of rspec/autorun
? It comes in spec_helper.rb
by default, but the specs works anyway with or without it.
As far as i understand, you would need rspec/autorun
if you want to run specs using "ruby" command.
From RSpec docs:
Generally, life is simpler if you just use the rspec command. If you must use the ruby command, however, you’ll want to do the following:
require 'rspec/autorun'
rspec/autorun installs an at_exit hook that runs your tests. That way you can simply execute your testfiles directly rather than passing them to the rspec command (and a few other tricks, like having tests run automatically when you execute a library file).
Most setups don't need it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With