Example #1
0
def compare_files_at_paths(actual_filename, expected_filename):
    """
    Assert that the contents of the fixture files
    at `actual_filename` and `expected_filename` are equal.
    """

    # Check that both files exist (to print a better error message)
    world.assert_file_exists(actual_filename)
    world.assert_file_exists(expected_filename)

    # Open both files and compare the contents
    with open(actual_filename) as actual_file:
        with open(expected_filename) as expected_file:
            assert_long_str_equal(
                expected_file.read().strip(),
                actual_file.read().strip()
            )
Example #2
0
def then_an_xunit_report_is_generated(step):
    world.assert_file_exists('xunit.xml')
    world.compare_files_at_paths(
        'xunit.xml', 'expected/jasmine_xunit.xml'
    )
Example #3
0
def then_a_default_test_suite_description_is_created(step):
    world.assert_file_exists('js_test_suite.yml')