<commit_before>require 'rails_helper'
require Rails.root.join(
  'spec', 'controllers', 'shared_examples', 'renders_index.rb'
)
require Rails.root.join(
  'spec', 'controllers', 'shared_examples', 'assigns_title.rb'
)

describe CountriesController, type: :controller do
  describe 'GET index' do
    subject {
      VCR.use_cassette('countries') { get :index }
    }
    it_behaves_like 'renders index'
    it_behaves_like 'assigns title', 'Country Profiles'
  end

  describe 'GET overview' do
    subject { get :overview }
    it 'renders overview' do
      subject
      expect(response).to render_template('overview')
    end
    it_behaves_like 'assigns title', 'Country Rankings'
  end

  describe 'GET show' do
    subject { get :show, params: {id: 'POL'} }
    it 'renders show' do
      subject
      expect(response).to render_template('show')
    end
  end
end<commit_msg>Comments spec that applies to new country pages<commit_after>require 'rails_helper'
require Rails.root.join(
  'spec', 'controllers', 'shared_examples', 'renders_index.rb'
)
require Rails.root.join(
  'spec', 'controllers', 'shared_examples', 'assigns_title.rb'
)

describe CountriesController, type: :controller do
  describe 'GET index' do
    subject {
      VCR.use_cassette('countries') { get :index }
    }
    it_behaves_like 'renders index'
    it_behaves_like 'assigns title', 'Country Profiles'
  end

  describe 'GET overview' do
    subject { get :overview }
    it 'renders overview' do
      subject
      expect(response).to render_template('overview')
    end
    it_behaves_like 'assigns title', 'Country Rankings'
  end

  #describe 'GET show' do
  #  subject { get :show, params: {id: 'POL'} }
  #  it 'renders show' do
  #    subject
  #    expect(response).to render_template('show')
  #  end
  #end
end
{'fraction_non_alphanumeric': 0.11344770337576093, 'fraction_numerical': 0.0, 'mean_word_length': 3.7083333333333335, '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': '3216846', 'n_tokens_mistral': 610, 'n_tokens_neox': 581, 'n_words': 160}