def METHOD_NAME(options, expected_playbook, tmp_path, mocker):
    mocker.patch.object(ansible_runner.__main__, 'run', save_playbook)
    spy = mocker.spy(ansible_runner.__main__, 'run')
    command = ['run', str(tmp_path)]
    command.extend(options)
    rc = ansible_runner.__main__.main(command)
    with open(tmp_path / 'play.yml') as f:
        playbook = json.loads(f.read())
    assert rc == 1
    assert playbook == expected_playbook
    assert spy.call_args.kwargs.get('private_data_dir') == str(tmp_path)