@with_setup(step_runner_environ)
def test_behave_as_step_can_access_the_scenario():
 @step('[^"]access the scenario')
 def access_the_scenario(step):
  assert_equal(step.scenario.name, 'The Original Scenario')
 try:
  f = Feature.from_string(FEATURE9)
  feature_result = f.run()
  assert feature_result.passed, 'The scenario passed to the behave_as step did not match'
 finally:
  registry.clear()

@ with_setup ( step_runner_environ ) def test_behave_as_step_can_access_the_scenario ( ) : @ step ( '[^"]access the scenario' ) def access_the_scenario ( step ) : assert_equal ( step . scenario . name , 'The Original Scenario' ) try : f = Feature . from_string ( FEATURE9 ) feature_result = f . run ( ) assert feature_result . passed , 'The scenario passed to the behave_as step did not match' finally : registry . clear ( )
when a step definition calls another step definition with behave_as .