@@ -22,9 +22,18 @@ module SpecHelper
2222 def run_defined_feature
2323 define_steps
2424 actual_runtime . visitor = Fanout . new ( [ @formatter ] )
25-
2625 receiver = Test ::Runner . new ( event_bus )
27- filters = [
26+
27+ event_bus . gherkin_source_read ( gherkin_doc . uri , gherkin_doc . body )
28+
29+ compile [ gherkin_doc ] , receiver , filters , event_bus
30+
31+ event_bus . test_run_finished
32+ end
33+
34+ def filters
35+ # TODO: Remove duplication with runtime.rb#filters
36+ [
2837 Filters ::ActivateSteps . new (
2938 StepMatchSearch . new ( actual_runtime . support_code . registry . method ( :step_matches ) , actual_runtime . configuration ) ,
3039 actual_runtime . configuration
@@ -33,11 +42,10 @@ def run_defined_feature
3342 Filters ::ApplyBeforeHooks . new ( actual_runtime . support_code ) ,
3443 Filters ::ApplyAfterHooks . new ( actual_runtime . support_code ) ,
3544 Filters ::ApplyAroundHooks . new ( actual_runtime . support_code ) ,
45+ Filters ::BroadcastTestCaseReadyEvent . new ( actual_runtime . configuration ) ,
46+ Filters ::BroadcastTestRunStartedEvent . new ( actual_runtime . configuration ) ,
3647 Filters ::PrepareWorld . new ( actual_runtime )
3748 ]
38- event_bus . gherkin_source_read ( gherkin_doc . uri , gherkin_doc . body )
39- compile [ gherkin_doc ] , receiver , filters , event_bus
40- event_bus . test_run_finished
4149 end
4250
4351 require 'cucumber/core/gherkin/document'
0 commit comments