@with_setup(step_runner_environ)
def test_feature_can_run_only_specified_scenarios():
 feature = Feature.from_string(FEATURE7)
 scenarios_ran = []
 @after.each_scenario
 def just_register(scenario):
  scenarios_ran.append(scenario.name)
 feature.run(scenarios=(2, 5))
 assert_equals(scenarios_ran, ['2nd one', '5th one'])

@ with_setup ( step_runner_environ ) def test_feature_can_run_only_specified_scenarios ( ) : feature = Feature . from_string ( FEATURE7 ) scenarios_ran = [ ] @ after . each_scenario def just_register ( scenario ) : scenarios_ran . append ( scenario . name ) feature . run ( scenarios = ( 2 , 5 ) ) assert_equals ( scenarios_ran , [ '2nd one' , '5th one' ] )
features can run only specified scenarios .