<commit_before>require 'spec_helper'
require 'flapjack/redis_pool'

describe Flapjack::RedisPool do

  it "is initialized" do
    EM.synchrony do
      redis_count = 3

      redis_conns = redis_count.times.collect {
        redis = double('redis')
        redis
      }
      expect(::Redis).to receive(:new).exactly(redis_count).times.and_return(*redis_conns)
      expect(Flapjack::Data::Migration).to receive(:correct_notification_rule_contact_linkages).exactly(redis_count).times
      expect(Flapjack::Data::Migration).to receive(:migrate_entity_check_data_if_required).exactly(redis_count).times
      expect(Flapjack::Data::Migration).to receive(:refresh_archive_index).exactly(redis_count).times

      frp = Flapjack::RedisPool.new(:size => redis_count)

      EM.stop
    end
  end

end<commit_msg>fix specs<commit_after>require 'spec_helper'
require 'flapjack/redis_pool'

describe Flapjack::RedisPool do

  it "is initialized" do
    EM.synchrony do
      redis_count = 3

      redis_conns = redis_count.times.collect {
        redis = double('redis')
        redis
      }
      expect(::Redis).to receive(:new).exactly(redis_count).times.and_return(*redis_conns)
      expect(Flapjack::Data::Migration).to receive(:correct_notification_rule_contact_linkages).exactly(redis_count).times
      expect(Flapjack::Data::Migration).to receive(:migrate_entity_check_data_if_required).exactly(redis_count).times
      expect(Flapjack::Data::Migration).to receive(:create_entity_ids_if_required).exactly(redis_count).times
      expect(Flapjack::Data::Migration).to receive(:refresh_archive_index).exactly(redis_count).times

      frp = Flapjack::RedisPool.new(:size => redis_count)

      EM.stop
    end
  end

end
{'fraction_non_alphanumeric': 0.1148491879350348, 'fraction_numerical': 0.001160092807424594, 'mean_word_length': 4.58252427184466, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1992865', 'n_tokens_mistral': 581, 'n_tokens_neox': 576, 'n_words': 72}