<commit_before>require "spec_helper"

describe "homebrew" do
  let(:facts) { default_test_facts }

  let(:dir) { facts[:homebrew_root] }
  let(:cmddir) { "#{dir}/Library/Taps/boxen/homebrew-brews/cmd" }

  it do
    should contain_exec("install homebrew to #{dir}/Homebrew").with({
      :cwd => "#{dir}/Homebrew",
      :user => 'testuser',
      :creates => "#{dir}/Homebrew/.git"
    })

    ["ldflags.sh", "cflags.sh", "homebrew.sh"].each do |f|
      should contain_file("/test/boxen/env.d/#{f}").
        with_ensure(:absent)
    end

    should contain_boxen__env_script("homebrew")

    should contain_file("#{dir}/lib").with_ensure("directory")
    should contain_file(cmddir).with_ensure("directory")
    should contain_file("#{dir}/Library/Taps").with_ensure("directory")
    should contain_file("/test/boxen/cache/homebrew").with_ensure("directory")
  end<commit_msg>Include Homebrew in library path<commit_after>require "spec_helper"

describe "homebrew" do
  let(:facts) { default_test_facts }

  let(:dir) { facts[:homebrew_root] }
  let(:cmddir) { "#{dir}/Homebrew/Library/Taps/boxen/homebrew-brews/cmd" }

  it do
    should contain_exec("install homebrew to #{dir}/Homebrew").with({
      :cwd => "#{dir}/Homebrew",
      :user => 'testuser',
      :creates => "#{dir}/Homebrew/.git"
    })

    ["ldflags.sh", "cflags.sh", "homebrew.sh"].each do |f|
      should contain_file("/test/boxen/env.d/#{f}").
        with_ensure(:absent)
    end

    should contain_boxen__env_script("homebrew")

    should contain_file("#{dir}/lib").with_ensure("directory")
    should contain_file(cmddir).with_ensure("directory")
    should contain_file("#{dir}/Homebrew/Library/Taps").with_ensure("directory")
    should contain_file("/test/boxen/cache/homebrew").with_ensure("directory")
  end
{'fraction_non_alphanumeric': 0.17827298050139276, 'fraction_numerical': 0.0, 'mean_word_length': 4.175792507204611, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '7294351', 'n_tokens_mistral': 622, 'n_tokens_neox': 605, 'n_words': 91}