def test_feature_has_scenarios():
 feature = Feature.from_string(FEATURE1)
 expect(feature.scenarios).to.be.a(list)
 expect(feature.scenarios).to.have.length_of(3)
 expected_scenario_names = ['Renting a featured movie', 'Renting a non-featured movie', 'Renting two movies allows client to take one more without charge']
 for (scenario, expected_name) in zip(feature.scenarios, expected_scenario_names):
  expect(scenario).to.be.a(Scenario)
  expect(scenario.name).to.equal(expected_name)
 expect(feature.scenarios[1].steps[0].keys).to.equal(('Name', 'Rating', 'New', 'Available'))
 expect(list(feature.scenarios[1].steps[0].hashes)).to.equal([{'Name': 'A night at the museum 2', 'Rating': '3 stars', 'New': 'yes', 'Available': '9'}, {'Name': 'Matrix Revolutions', 'Rating': '4 stars', 'New': 'no', 'Available': '6'}])

def test_feature_has_scenarios ( ) : feature = Feature . from_string ( FEATURE1 ) expect ( feature . scenarios ) . to . be . a ( list ) expect ( feature . scenarios ) . to . have . length_of ( 3 ) expected_scenario_names = [ 'Renting a featured movie' , 'Renting a non-featured movie' , 'Renting two movies allows client to take one more without charge' ] for ( scenario , expected_name ) in zip ( feature . scenarios , expected_scenario_names ) : expect ( scenario ) . to . be . a ( Scenario ) expect ( scenario . name ) . to . equal ( expected_name ) expect ( feature . scenarios [ 1 ] . steps [ 0 ] . keys ) . to . equal ( ( 'Name' , 'Rating' , 'New' , 'Available' ) ) expect ( list ( feature . scenarios [ 1 ] . steps [ 0 ] . hashes ) ) . to . equal ( [ { 'Name' : 'A night at the museum 2' , 'Rating' : '3 stars' , 'New' : 'yes' , 'Available' : '9' } , { 'Name' : 'Matrix Revolutions' , 'Rating' : '4 stars' , 'New' : 'no' , 'Available' : '6' } ] )
a feature object should have a list of scenarios .