<commit_before><commit_msg>Add "in-repo-addon" blueprint test<commit_after>'use strict';

var fs = require('fs-extra');
var path = require('path');
var blueprintHelpers = require('ember-cli-blueprint-test-helpers/helpers');
var setupTestHooks = blueprintHelpers.setupTestHooks;
var emberNew = blueprintHelpers.emberNew;
var emberGenerateDestroy = blueprintHelpers.emberGenerateDestroy;

var expect = require('ember-cli-blueprint-test-helpers/chai').expect;

describe('Acceptance: ember generate and destroy in-repo-addon', function() {
  setupTestHooks(this, {
    cliPath: path.resolve(__dirname + '/../../..'),
  });

  it('in-repo-addon fooBar', function() {
    var args = ['in-repo-addon', 'fooBar'];

    return emberNew()
      .then(function() {
        expect(fs.readJsonSync('package.json')['ember-addon']).to.be.undefined;
      })
      .then(function() {
        return emberGenerateDestroy(args, function(file) {
          expect(file('lib/foo-bar/package.json')).to.exist;
          expect(file('lib/foo-bar/index.js')).to.exist;

          expect(fs.readJsonSync('lib/foo-bar/package.json')).to.deep.equal({
            "name": "foo-bar",
            "keywords": [
              "ember-addon",
            ],
          });

          expect(fs.readJsonSync('package.json')['ember-addon']).to.deep.equal({
            "paths": [
              "lib/foo-bar",
            ],
          });
        });
      });
  });
});

{'fraction_non_alphanumeric': 0.17642956764295675, 'fraction_numerical': 0.0, 'mean_word_length': 2.7369791666666665, 'pattern_counts': {'":': 3, '<': 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': '2879651', 'n_tokens_mistral': 451, 'n_tokens_neox': 453, 'n_words': 61}