Skip to content

Commit

Permalink
docs: Add example of proc being acceptable as filter in config.include
Browse files Browse the repository at this point in the history
  • Loading branch information
the-spectator committed Sep 11, 2024
1 parent c905f85 commit 59b524c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/rspec/core/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,9 @@ def exclusion_filter
#
# # included in examples with `:type => :request` metadata
# config.include(AuthenticationHelpers, :type => :request)
#
# # included in examples where the `:type` metadata matches a proc condition
# config.include(AuthenticationHelpers, :type => ->(type, _metadata) { [:request, :controller].include?(type) })
# end
#
# describe "edit profile", :preferences, :type => :request do
Expand Down

0 comments on commit 59b524c

Please sign in to comment.