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 committed Oct 1, 2024
1 parent 551a386 commit b193025
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 @@ -1402,6 +1402,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 b193025

Please sign in to comment.