<commit_before>var path = require('path');
var helpers = require('yeoman-test');
var assert = require('yeoman-assert');
var util = require('util');

describe("yo ansible", function() {
    var playbookName = "testPlaybookName";
    var groups = ["testGroupOne", "testGroupTwo"];
    var hosts = ["testHostOne.local", "testHostTwo.local"];
    var plays = ["testPlayOne", "testPlayTwo"];

    before(function(done) {
        helpers.run(path.join(__dirname, '../app'))
            .withPrompts({
                playbookName: playbookName,
                groups: groups,
                hosts: hosts,
                plays: plays,
            })
            .withGenerators([[helpers.createDummyGenerator(), 'license']])
            .on('end', done);
    });

    it('produces a site.yml file', function() {
        assert.file('site.yml');
    });

    it('produces a play file for each play specified', function() {
        var playFiles = plays.map(function(play) { return util.format("plays/%s.yml", play); });
        assert.file(playFiles);
    });

    it('produces a host var file for each host', function() {
        var hostVarFiles = hosts.map(function(host) { return util.format("host_vars/%s", host); });
        assert.file(hostVarFiles);
    });<commit_msg>Add README test<commit_after>var path = require('path');
var helpers = require('yeoman-test');
var assert = require('yeoman-assert');
var util = require('util');

describe("yo ansible", function() {
    var playbookName = "testPlaybookName";
    var groups = ["testGroupOne", "testGroupTwo"];
    var hosts = ["testHostOne.local", "testHostTwo.local"];
    var plays = ["testPlayOne", "testPlayTwo"];

    before(function(done) {
        helpers.run(path.join(__dirname, '../app'))
            .withPrompts({
                playbookName: playbookName,
                groups: groups,
                hosts: hosts,
                plays: plays,
            })
            .withGenerators([[helpers.createDummyGenerator(), 'license']])
            .on('end', done);
    });

    it('produces a site.yml file', function() {
        assert.file('site.yml');
    });

    it('README.md has name of playbook in it', function() {
        assert.fileContent('README.md', playbookName);
    });

    it('produces a play file for each play specified', function() {
        var playFiles = plays.map(function(play) { return util.format("plays/%s.yml", play); });
        assert.file(playFiles);
    });

    it('produces a host var file for each host', function() {
        var hostVarFiles = hosts.map(function(host) { return util.format("host_vars/%s", host); });
        assert.file(hostVarFiles);
    });
{'fraction_non_alphanumeric': 0.15992509363295881, 'fraction_numerical': 0.0, 'mean_word_length': 2.6841379310344826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '471806', 'n_tokens_mistral': 787, 'n_tokens_neox': 761, 'n_words': 180}