<commit_before>require "codeclimate-test-reporter"
CodeClimate::TestReporter.start

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'togls'

require 'pry'

RSpec.configure do |c|
  c.disable_monkey_patching!
  c.order = :random

  c.before(:each) do
    Togls.instance_variable_set(:@release_toggle_registry, nil)
    Togls.instance_variable_set(:@feature_repository, nil)
    Togls.instance_variable_set(:@rule_type_repository, nil)
    Togls.instance_variable_set(:@rule_type_registry, nil)
  end

  c.around(:each) do |example|
    save_default_feature_target_type = Togls.default_feature_target_type
    # Togls.instance_variable_set(:@default_feature_target_type, :test_target_type)
    Togls.instance_variable_set(:@default_feature_target_type, nil)
    example.run
    Togls.instance_variable_set(:@default_feature_target_type, save_default_feature_target_type)
  end
end<commit_msg>Add verify partial doubles to spec helper<commit_after>require "codeclimate-test-reporter"
CodeClimate::TestReporter.start

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'togls'

require 'pry'

RSpec.configure do |c|
  c.disable_monkey_patching!
  c.order = :random
  c.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  c.before(:each) do
    Togls.instance_variable_set(:@release_toggle_registry, nil)
    Togls.instance_variable_set(:@feature_repository, nil)
    Togls.instance_variable_set(:@rule_type_repository, nil)
    Togls.instance_variable_set(:@rule_type_registry, nil)
  end

  c.around(:each) do |example|
    save_default_feature_target_type = Togls.default_feature_target_type
    # Togls.instance_variable_set(:@default_feature_target_type, :test_target_type)
    Togls.instance_variable_set(:@default_feature_target_type, nil)
    example.run
    Togls.instance_variable_set(:@default_feature_target_type, save_default_feature_target_type)
  end
end
{'fraction_non_alphanumeric': 0.0997920997920998, 'fraction_numerical': 0.0, 'mean_word_length': 6.209737827715355, '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': '7015966', 'n_tokens_mistral': 676, 'n_tokens_neox': 669, 'n_words': 94}