Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit b193025

Browse files
committed
Merge pull request #3112 from the-spectator/proc_type
docs: Add example of proc being acceptable as filter in config.include
1 parent 551a386 commit b193025

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/rspec/core/configuration.rb

+3
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,9 @@ def exclusion_filter
14021402
#
14031403
# # included in examples with `:type => :request` metadata
14041404
# config.include(AuthenticationHelpers, :type => :request)
1405+
#
1406+
# # included in examples where the `:type` metadata matches a proc condition
1407+
# config.include(AuthenticationHelpers, :type => proc { |type, _metadata| [:request, :controller].include?(type) })
14051408
# end
14061409
#
14071410
# describe "edit profile", :preferences, :type => :request do

0 commit comments

Comments
 (0)