<commit_before>require 'spec_helper'

describe 'Locale redirects routing', type: :request do
  %w[ru en de es].each do |locale|
    it "to #index locale: #{locale}" do
      get("/#{locale}")
      expect(response).to redirect_to(root_path)
    end

    it "to places#index locale: #{locale}" do
      get("/#{locale}/places")
      expect(response).to redirect_to(places_path)
    end
  end
end<commit_msg>Fix race condition in tests<commit_after>require 'spec_helper'

describe 'Locale redirects routing', type: :request do
  after(:each) do
    I18n.locale = :en
  end

  %w[ru en de es].each do |locale|
    it "to #index locale: #{locale}" do
      get("/#{locale}")

      expect(response).to redirect_to(root_path)
    end

    it "to places#index locale: #{locale}" do
      get("/#{locale}/places")

      expect(response).to redirect_to(places_path)
    end
  end
end
{'fraction_non_alphanumeric': 0.13683010262257697, 'fraction_numerical': 0.002280501710376283, 'mean_word_length': 3.4120603015075375, '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': '2743229', 'n_tokens_mistral': 293, 'n_tokens_neox': 284, 'n_words': 82}