Stop writing "require 'spec_helper'" in every spec

Updated . Posted . Visible to the public.

Simply add this to your .rspec instead:

--require spec_helper

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.

Tobias Kraze
Last edit
Arne Hartherz
License
Source code in this card is licensed under the MIT License.
Posted by Tobias Kraze to makandra dev (2015-11-18 14:18)