<commit_before>describe 'enterprise-hello-world example project' do
  let(:root) { example_project_dir 'enterprise-hello-world' }

  around do |example|
    Dir.chdir root do
      example.run
    end
  end

  before do
    begin
      Pathname.glob('src/*/bin').each(&:rmtree)
      Pathname.new('project.lock.json').delete
    rescue Errno::ENOENT # rubocop:disable Lint/HandleExceptions
      # do nohting
    end
  end

  describe 'rake' do
    it 'should output "Hello World!"' do
      expect { rake }.to output(/^Hello World!$/).to_stdout
    end
  end

  describe 'rake build' do
    def dll_for_project(project)
      root + 'src' + project + 'bin/Debug/dnx451' + "#{project}.dll"
    end

    it 'should build Acme.HelloWorld.App' do
      rake 'restore', 'build', quiet: true

      expect(dll_for_project 'Acme.HelloWorld.App').to exist
    end
  end

  describe 'rake pack' do
    def nupkg_for_project(project, version)
      root + 'src' + project + 'bin/Debug' + "#{project}.#{version}.nupkg"
    end

    def symbols_nupkg_for_project(project, version)
      package = "#{project}.#{version}.symbols.nupkg"
      root + 'src' + project + 'bin/Debug' + package
    end

    it 'should build the Acme.HelloWorld.App packages' do
      rake 'restore', 'pack', quiet: true

      expect(nupkg_for_project 'Acme.HelloWorld.App', '1.0.0').to exist
      expect(symbols_nupkg_for_project 'Acme.HelloWorld.App', '1.0.0').to exist
    end
  end
end
<commit_msg>Added tests for new ehw projects<commit_after>describe 'enterprise-hello-world example project' do
  let(:root) { example_project_dir 'enterprise-hello-world' }

  around do |example|
    Dir.chdir root do
      example.run
    end
  end

  before do
    begin
      Pathname.glob('src/*/bin').each(&:rmtree)
      Pathname.new('project.lock.json').delete
    rescue Errno::ENOENT # rubocop:disable Lint/HandleExceptions
      # do nohting
    end
  end

  describe 'rake' do
    it 'should output "Hello World!"' do
      expect { rake }.to output(/^Hello World!$/).to_stdout
    end
  end

  describe 'rake build' do
    def dll(project, dir = 'src')
      root + dir + project + 'bin/Debug/dnx451' + "#{project}.dll"
    end

    it 'should build Acme.HelloWorld.App' do
      rake 'restore', 'build', quiet: true

      expect(dll 'Acme.HelloWorld.App').to exist
    end

    it 'should build Acme.HelloWorld.Data' do
      rake 'restore', 'build', quiet: true

      expect(dll 'Acme.HelloWorld.Data').to exist
    end

    it 'should build Acme.HelloWorld.Data.Test' do
      rake 'restore', 'build', quiet: true

      expect(dll 'Acme.HelloWorld.Data.Test', 'test').to exist
    end
  end

  describe 'rake pack' do
    def nupkg(project, version, dir = 'src')
      root + dir + project + 'bin/Debug' + "#{project}.#{version}.nupkg"
    end

    def symbols_nupkg(project, version, dir = 'src')
      package = "#{project}.#{version}.symbols.nupkg"
      root + dir + project + 'bin/Debug' + package
    end

    it 'should build the Acme.HelloWorld.App packages' do
      rake 'restore', 'pack', quiet: true

      expect(nupkg 'Acme.HelloWorld.App', '1.0.0').to exist
      expect(symbols_nupkg 'Acme.HelloWorld.App', '1.0.0').to exist
    end

    it 'should build the Acme.HelloWorld.Data packages' do
      rake 'restore', 'pack', quiet: true

      expect(nupkg 'Acme.HelloWorld.Data', '1.0.0').to exist
      expect(symbols_nupkg 'Acme.HelloWorld.Data', '1.0.0').to exist
    end

    it 'should build the Acme.HelloWorld.Data.Test packages' do
      rake 'restore', 'pack', quiet: true

      expect(nupkg 'Acme.HelloWorld.Data.Test', '1.0.0', 'test').to exist
      expect(symbols_nupkg 'Acme.HelloWorld.Data.Test',
                           '1.0.0', 'test').to exist
    end
  end
end

{'fraction_non_alphanumeric': 0.13195548489666137, 'fraction_numerical': 0.00794912559618442, 'mean_word_length': 2.813131313131313, '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': '3823327', 'n_tokens_mistral': 1312, 'n_tokens_neox': 1267, 'n_words': 324}