title says it all mostly. Given new Rails app and rspec-rails. If I app an app/lib/foo.rb class. How do I configure rspec to be loaded so I do not have to do this:
# spec/lib/foo_spec.rb
require "rails_helper"
describe Foo do
end
title says it all mostly. Given new Rails app and rspec-rails. If I app an app/lib/foo.rb class. How do I configure rspec to be loaded so I do not have to do this:
# spec/lib/foo_spec.rb
require "rails_helper"
describe Foo do
end
In the .rspec file at the root of the project, add
--require rspec_helper
on its own line. The rspec command adds any options in this file automatically when run.