RSpec: Include based on type
# spec/support/user_support.rb
RSpec.configure do |config|
config.include UserHelper, type: :user
config.include_context "user_context", type: :use
end
# spec/user_something.rb
describe User, type: :user do
# The includes will not be needed here anymore.
# include UserHelper
# include_context "user_context"