<commit_before>require 'spec_helper'

describe 'xfs::default' do
  let(:chef_run) do
    ChefSpec::ServerRunner.new do |node|
      node.automatic[:lsb][:codename] = 'trusty'
    end.converge(described_recipe)
  end

  it 'installs xfsprogs' do
    expect(chef_run).to install_package('xfsprogs')
  end

  context 'dev_packages true on centos 6.7' do
    let(:chef_run) do
      ChefSpec::ServerRunner.new(platform: 'centos', version: '6.7') do |node|
        node.set['xfs']['dev_packages'] = true
      end.converge('xfs::default')
    end

    it 'should install dev package' do
      expect(chef_run).to install_package('xfsprogs-devel')
    end
  end

  context 'dev_packages true on ubuntu 14.04 ' do
    let(:chef_run) do
      ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '14.04') do |node|
        node.set['xfs']['dev_packages'] = true
      end.converge('xfs::default')
    end

    it 'should install dev package' do
      expect(chef_run).to install_package('xfslibs-dev')<commit_msg>Travis can't pull new fauxhai data from the web<commit_after>require 'spec_helper'

describe 'xfs::default' do
  let(:chef_run) do
    ChefSpec::ServerRunner.new do |node|
      node.automatic[:lsb][:codename] = 'trusty'
    end.converge(described_recipe)
  end

  it 'installs xfsprogs' do
    expect(chef_run).to install_package('xfsprogs')
  end

  context 'dev_packages true on centos 7.0' do
    let(:chef_run) do
      ChefSpec::ServerRunner.new(platform: 'centos', version: '7.0') do |node|
        node.set['xfs']['dev_packages'] = true
      end.converge('xfs::default')
    end

    it 'should install dev package' do
      expect(chef_run).to install_package('xfsprogs-devel')
    end
  end

  context 'dev_packages true on ubuntu 14.04 ' do
    let(:chef_run) do
      ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '14.04') do |node|
        node.set['xfs']['dev_packages'] = true
      end.converge('xfs::default')
    end

    it 'should install dev package' do
      expect(chef_run).to install_package('xfslibs-dev')
{'fraction_non_alphanumeric': 0.13219512195121952, 'fraction_numerical': 0.011707317073170732, 'mean_word_length': 3.6507936507936507, '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': '1536675', 'n_tokens_mistral': 759, 'n_tokens_neox': 717, 'n_words': 161}