<commit_before>require 'spec_helper'

describe 'google_chrome' do

  context 'with Debian osfamily' do
    let :facts do
      {
          :osfamily  => 'Debian',
          :lsbdistid => 'Debian',
      }
    end

    it do
      should contain_class('google_chrome::config')
      should contain_class('google_chrome::install')
      should contain_apt__source('google-chrome')
      should contain_package('google-chrome-stable').with(
        :ensure => 'installed',
      )
     end
  end

  context 'does not support RHEL 6' do
    let :facts do
      {
          :osfamily                  => 'RedHat',
          :operatingsystemmajrelease => 6,
      }
    end

    it 'should fail' do
      expect { should compile }.to raise_error(/Operating system not supported/)
    end
  end

  context 'with Fedora operatingsystem' do
    let :facts do
      {
          :osfamily        => 'RedHat',
          :operatingsystem => 'Fedora',
          :lsbdistid       => 'Fedora',
	  :os		   => {
	    :release  => {
	      'major' => '7',
	    },
	  }
      }
    end
<commit_msg>Set OS major version for Fedora test<commit_after>require 'spec_helper'

describe 'google_chrome' do

  context 'with Debian osfamily' do
    let :facts do
      {
          :osfamily  => 'Debian',
          :lsbdistid => 'Debian',
      }
    end

    it do
      should contain_class('google_chrome::config')
      should contain_class('google_chrome::install')
      should contain_apt__source('google-chrome')
      should contain_package('google-chrome-stable').with(
        :ensure => 'installed',
      )
     end
  end

  context 'does not support RHEL 6' do
    let :facts do
      {
          :osfamily                  => 'RedHat',
          :operatingsystemmajrelease => 6,
      }
    end

    it 'should fail' do
      expect { should compile }.to raise_error(/Operating system not supported/)
    end
  end

  context 'with Fedora operatingsystem' do
    let :facts do
      {
          :osfamily                  => 'RedHat',
          :operatingsystem           => 'Fedora',
          :lsbdistid                 => 'Fedora',
          :operatingsystemmajrelease => 24,
      }
    end

{'fraction_non_alphanumeric': 0.10453920220082531, 'fraction_numerical': 0.0032095369096744614, 'mean_word_length': 1.8597640891218872, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '911894', 'n_tokens_mistral': 693, 'n_tokens_neox': 647, 'n_words': 164}