Read more

Stop writing "require 'spec_helper'" in every spec

Tobias Kraze
November 18, 2015Software engineer at makandra GmbH

Simply add this to your .rspec instead:

--require spec_helper
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more

If you are on rspec >= 3 and use a rails_helper.rb require this instead of the spec_helper:

--require rails_helper

If you are using parallel_tests and this is not working for you, .rspec might be ignored. Try using a .rspec_parallel file.

Posted by Tobias Kraze to makandra dev (2015-11-18 15:18)