'Test handling of plugins_info stub option.'

@mock.patch('jenkins_jobs.cli.subcommand.update.XmlJobGenerator.generateXML')
@mock.patch('jenkins_jobs.cli.subcommand.update.ModuleRegistry')
def test_plugins_info_stub_option(self, registry_mock, generateXML_mock):

    plugins_info_stub_yaml_file = os.path.join(self.fixtures_path, 'plugins-info.yaml')
    args = ['--conf', os.path.join(self.fixtures_path, 'cmd-001.conf'), 'test', '-p', plugins_info_stub_yaml_file, os.path.join(self.fixtures_path, 'cmd-001.yaml')]
    self.execute_jenkins_jobs_with_args(args)
    with io.open(plugins_info_stub_yaml_file, 'r', encoding='utf-8') as yaml_file:
        plugins_info_list = yaml.load(yaml_file)
    registry_mock.assert_called_with(mock.ANY, plugins_info_list)
