<commit_before>require_relative '../../../../spec_helper'

describe 'hosts::skyscape::production_like', :type => :class do
  context 'with website_host not set we expect default behaviour of putting in www.gov.uk' do
    it { should contain_govuk__host('cache').with_legacy_aliases(['cache', "www.test.gov.uk", "www-origin.test.gov.uk", "www.gov.uk"]) }
  end
end 

describe 'hosts::skyscape::production_like', :type => :class do

  before :each do
    update_extdata({'website_host' => 'www.doesnt.exist',})
  end

  #force refresh of the extdata - yes its a hack
  let(:facts) { {:foo => "bar"} }

  context 'with website_host set to a non-default value we expect it in the list' do
    it { should contain_govuk__host('cache').with_legacy_aliases(['cache', "www.test.gov.uk", "www-origin.test.gov.uk", "www.doesnt.exist"]) }
  end
end 



<commit_msg>Wrap hosts specs within same describe block<commit_after>require_relative '../../../../spec_helper'

describe 'hosts::skyscape::production_like', :type => :class do
  context 'with website_host => www.gov.uk (default)' do
    it { should contain_govuk__host('cache').with_legacy_aliases(['cache', "www.test.gov.uk", "www-origin.test.gov.uk", "www.gov.uk"]) }
  end

  context 'with website_host => www.doesnt.exist' do
    before :each do
      update_extdata({'website_host' => 'www.doesnt.exist',})
    end

    #force refresh of the extdata - yes its a hack
    let(:facts) {{ :foo => "bar" }}

    it { should contain_govuk__host('cache').with_legacy_aliases(['cache', "www.test.gov.uk", "www-origin.test.gov.uk", "www.doesnt.exist"]) }
  end
end 
{'fraction_non_alphanumeric': 0.16697819314641746, 'fraction_numerical': 0.0, 'mean_word_length': 4.1309904153354635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 17, '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': '1458999', 'n_tokens_mistral': 551, 'n_tokens_neox': 537, 'n_words': 132}