def test_custom_replay_file(monkeypatch, mocker, user_config_file) -> None:
    """Check that reply.load is called with the custom replay_file."""
    monkeypatch.chdir('tests/fake-repo-tmpl')

    mock_replay_load = mocker.patch('cookiecutter.main.load')
    mocker.patch('cookiecutter.main.generate_context').return_value = {
        'cookiecutter': {}
    }
    mocker.patch('cookiecutter.main.generate_files')
    mocker.patch('cookiecutter.main.dump')

    cookiecutter(
        '.',
        replay='./custom-replay-file',
        config_file=user_config_file,
    )

    mock_replay_load.assert_called_once_with(
        '.',
        'custom-replay-file',
    )
Check that reply.load is called with the custom replay_file.
tests/test_main.py