def test_feature_finder_finds_all_feature_files_within_a_dir(): "FeatureLoader finds all feature files within a directory" ff = FeatureLoader(cjoin()) files = ff.find_feature_files() assert_equals( sorted(files), sorted([ cjoin('1st_feature_dir', 'one_more.feature'), cjoin('1st_feature_dir', 'some.feature'), cjoin('1st_feature_dir', 'more_features_here', 'another.feature'), cjoin('2nd_feature_dir', 'before_and_after_all.feature'), cjoin('2nd_feature_dir', 'with_defined_steps.feature'), cjoin('3rd_feature_dir', 'my_steps_are_anywhere.feature'), ]))
def test_feature_finder_finds_all_feature_files_within_a_dir(): "FeatureLoader finds all feature files within a directory" ff = FeatureLoader(cjoin()) files = ff.find_feature_files() assert_equals( sorted(files), sorted([ cjoin('1st_feature_dir', 'one_more.feature'), cjoin('1st_feature_dir', 'some.feature'), cjoin('1st_feature_dir', 'more_features_here', 'another.feature'), cjoin('2nd_feature_dir', 'before_and_after_all.feature'), cjoin('2nd_feature_dir', 'with_defined_steps.feature'), cjoin('3rd_feature_dir', 'my_steps_are_anywhere.feature'), ]) )
def test_defined_step_represent_string(): "Defined step represented without colors" feature_file = ojoin('runner_features', 'first.feature') feature_dir = ojoin('runner_features') loader = FeatureLoader(feature_dir) world._output = StringIO() world._is_colored = False loader.find_and_load_step_definitions() feature = Feature.from_file(feature_file) step = feature.scenarios[0].steps[0] step.run(True) assert_equals( step.represent_string(step.sentence), " Given I do nothing # tests/functional/output_features/runner_features/dumb_steps.py:6\n" )
def test_feature_finder_finds_all_feature_files_within_a_dir(): "FeatureLoader finds all feature files within a directory" ff = FeatureLoader(cjoin()) files = ff.find_feature_files() assert_equals( sorted(files), sorted( [ cjoin("1st_feature_dir", "one_more.feature"), cjoin("1st_feature_dir", "some.feature"), cjoin("1st_feature_dir", "more_features_here", "another.feature"), cjoin("2nd_feature_dir", "before_and_after_all.feature"), cjoin("2nd_feature_dir", "with_defined_steps.feature"), cjoin("3rd_feature_dir", "my_steps_are_anywhere.feature"), ] ), )