Skip to content

Commit

Permalink
Merge pull request #3112 from the-spectator/proc_type
Browse files Browse the repository at this point in the history
docs: Add example of proc being acceptable as filter in config.include
  • Loading branch information
JonRowe authored Sep 11, 2024
2 parents c905f85 + 86a12b7 commit 57cc861
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 => proc { |type, _metadata| [:request, :controller].include?(type) })
# end
#
# describe "edit profile", :preferences, :type => :request do
Expand Down

0 comments on commit 57cc861

Please sign in to comment.