# file:features/steps/step_tutorial05.py# ----------------------------------------------------------------------------# STEPS:# ----------------------------------------------------------------------------frombehaveimportgiven,when,thenfromhamcrestimportassert_that,equal_to@given('a sample text loaded into the frobulator')defstep_impl(context):frobulator=getattr(context,"frobulator",None)ifnotfrobulator:context.frobulator=Frobulator()context.frobulator.text=context.text#< STEP-DATA from context.text@when('we activate the frobulator')defstep_impl(context):context.frobulator.activate()@then('we will find it similar to {language}')defstep_impl(context,language):assert_that(language,equal_to(context.frobulator.seems_like_language()))