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

Commit 30d2110

Browse files
authored
Merge pull request #2552 from p-mongo/filter-examples-master
Add filter_examples method
2 parents 7b6b9c3 + 25960d4 commit 30d2110

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/rspec/core/world.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ def initialize(configuration=RSpec.configuration)
2121
configuration.world = self
2222
@example_groups = []
2323
@example_group_counts_by_spec_file = Hash.new(0)
24+
prepare_example_filtering
25+
end
26+
27+
# @api public
28+
#
29+
# Creates the list of filtered examples given current configuration.
30+
#
31+
# This is a separate method so that filters can be modified/replaced and
32+
# examples refiltered during a process's lifetime.
33+
def prepare_example_filtering
2434
@filtered_examples = Hash.new do |hash, group|
2535
hash[group] = filter_manager.prune(group.examples)
2636
end

0 commit comments

Comments
 (0)