def test_can_parse_tabular_step_followed_by_regular_step():
 steps = Step.many_from_lines((I_HAVE_TASTY_BEVERAGES.splitlines() + I_LIKE_VEGETABLES.splitlines()))
 assert_equals(len(steps), 2)
 assert isinstance(steps[0], Step)
 assert isinstance(steps[1], Step)
 assert_equals(steps[0].sentence, string.split(I_HAVE_TASTY_BEVERAGES, '\n')[0])
 assert_equals(steps[1].sentence, I_LIKE_VEGETABLES)

def test_can_parse_tabular_step_followed_by_regular_step ( ) : steps = Step . many_from_lines ( ( I_HAVE_TASTY_BEVERAGES . splitlines ( ) + I_LIKE_VEGETABLES . splitlines ( ) ) ) assert_equals ( len ( steps ) , 2 ) assert isinstance ( steps [ 0 ] , Step ) assert isinstance ( steps [ 1 ] , Step ) assert_equals ( steps [ 0 ] . sentence , string . split ( I_HAVE_TASTY_BEVERAGES , '\n' ) [ 0 ] ) assert_equals ( steps [ 1 ] . sentence , I_LIKE_VEGETABLES )
it should correctly extract two steps into an array .