<commit_before>require 'spec_helper'

describe 'tomcat', :type => :class do

  let :params_data do
    {
      :tomcat_version   => '7.0.50',
      :java_home        => '/usr/lib/jvm/jre-1.7.0-openjdk.x86_64'
    }
  end

  context 'When on an unsupported operating system family' do
    let :facts do
      {
        :osfamily   =>  'Gentoo'
      }
    end

    it 'should send an *unsupported* error' do
      expect { should compile }.to raise_error(Puppet::Error, /Unsupported/)
    end
  end

  context 'When on a future supported operating system family' do
    let :facts do
      {
        :osfamily   => 'debian'
      }
    end

    it 'should send a "coming soon" message' do
      expect { should compile }.to raise_error(Puppet::Error, /coming soon/)
    end
  end

  describe 'On RedHat-ish' do
    let :facts do
      { :osfamily => 'redhat', :operatingsystemrelease => '6.4'}
    end

    context 'When installing/managing java' do
      let :hiera_data  do
        { tomcat::install_java    => true }
      end

      it 'should install a java package' do
        should contain_package('java-1.7.0-openjdk')
        should contain_package('java-1.7.0-openjdk-devel')
      end

    end<commit_msg>Revert to params for test so Drew can experience the awesomeness<commit_after>require 'spec_helper'

describe 'tomcat', :type => :class do

  let :params_data do
    {
      :tomcat_version   => '7.0.50',
      :java_home        => '/usr/lib/jvm/jre-1.7.0-openjdk.x86_64'
    }
  end

  context 'When on an unsupported operating system family' do
    let :facts do
      {
        :osfamily   =>  'Gentoo'
      }
    end

    it 'should send an *unsupported* error' do
      expect { should compile }.to raise_error(Puppet::Error, /Unsupported/)
    end
  end

  context 'When on a future supported operating system family' do
    let :facts do
      {
        :osfamily   => 'debian'
      }
    end

    it 'should send a "coming soon" message' do
      expect { should compile }.to raise_error(Puppet::Error, /coming soon/)
    end
  end

  describe 'On RedHat-ish' do
    let :facts do
      { :osfamily => 'redhat', :operatingsystemrelease => '6.4'}
    end

    context 'When installing/managing java' do
      let :params_data  do
        { :install_java    => true }
      end

      it 'should install a java package' do
        should contain_package('java-1.7.0-openjdk')
        should contain_package('java-1.7.0-openjdk-devel')
      end

    end
{'fraction_non_alphanumeric': 0.10617682680662091, 'fraction_numerical': 0.015341138473960436, 'mean_word_length': 2.23921568627451, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '3677790', 'n_tokens_mistral': 852, 'n_tokens_neox': 812, 'n_words': 237}