<commit_before>require 'spec_helper'

describe 'g5-postgresql::default' do
  let(:chef_run) do
    ChefSpec::Runner.new do |node|
      node.set['postgresql']['password']['postgres'] = postgres_password
    end.converge(described_recipe)
  end

  let(:postgres_password) { '<PASSWORD>' }
  let(:version) { chef_run.node.postgresql['version'] }

  it 'sets up the locale template' do
    expect(chef_run).to create_template('/etc/default/locale').with(<commit_msg>Update unit tests for latest version of chefspec<commit_after>require 'spec_helper'

describe 'g5-postgresql::default' do
  before do
    # Stub command that cookbook uses to determine if postgresql is
    # already installed
    stub_command('ls /var/lib/postgresql/9.3/main/recovery.conf').and_return('')
  end

  let(:chef_run) do
    ChefSpec::SoloRunner.new do |node|
      node.set['postgresql']['password']['postgres'] = postgres_password
    end.converge(described_recipe)
  end

  let(:postgres_password) { '<PASSWORD>' }
  let(:version) { chef_run.node.postgresql['version'] }

  it 'sets up the locale template' do
    expect(chef_run).to create_template('/etc/default/locale').with(
{'fraction_non_alphanumeric': 0.13569576490924806, 'fraction_numerical': 0.003457216940363008, 'mean_word_length': 4.819095477386934, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5774686', 'n_tokens_mistral': 392, 'n_tokens_neox': 381, 'n_words': 77}