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

Commit 59b524c

Browse files
committed
docs: Add example of proc being acceptable as filter in config.include
1 parent c905f85 commit 59b524c

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
@@ -1409,6 +1409,9 @@ def exclusion_filter
14091409
#
14101410
# # included in examples with `:type => :request` metadata
14111411
# config.include(AuthenticationHelpers, :type => :request)
1412+
#
1413+
# # included in examples where the `:type` metadata matches a proc condition
1414+
# config.include(AuthenticationHelpers, :type => ->(type, _metadata) { [:request, :controller].include?(type) })
14121415
# end
14131416
#
14141417
# describe "edit profile", :preferences, :type => :request do

0 commit comments

Comments
 (0)