<commit_before>require 'test_helper'

class MethodPolutionTest < Minitest::Test

  ALLOWED_POLUTING_PLUGINS = { immutable: [:set] }

  class AtrsClassWithoutPlugins
    include Atrs
  end

  class AtrsClassWithCleanPlugins
    include Atrs
    plugin *(Atrs.plugins.keys - ALLOWED_POLUTING_PLUGINS.keys)
  end

  class AtrsClassWithAllowedPolutingPlugins
    include Atrs
    plugin *(ALLOWED_POLUTING_PLUGINS.keys)
  end
  
  def methods_class_without_plugins
    AtrsClassWithoutPlugins.new.methods - Object.methods
  end

  def methods_class_with_clean_plugins
    AtrsClassWithCleanPlugins.new.methods - Object.methods
  end

  def methods_class_with_polution_allowed_plugins
    AtrsClassWithAllowedPolutingPlugins.new.methods - Object.methods
  end

  def test_without_plugins
    assert_equal [], methods_class_without_plugins.delete_if { |m| m.to_s[/^_/] }
  end

  def test_with_plugins
    assert_equal [], methods_class_with_clean_plugins.delete_if { |m| m.to_s[/^_/] }
  end<commit_msg>Fixed warning in method polution test<commit_after>require 'test_helper'

class MethodPolutionTest < Minitest::Test

  ALLOWED_POLUTING_PLUGINS = { immutable: [:set] }

  class AtrsClassWithoutPlugins
    include Atrs
  end

  class AtrsClassWithCleanPlugins
    include Atrs
    plugin(*(Atrs.plugins.keys - ALLOWED_POLUTING_PLUGINS.keys))
  end

  class AtrsClassWithAllowedPolutingPlugins
    include Atrs
    plugin(*(ALLOWED_POLUTING_PLUGINS.keys))
  end

  def methods_class_without_plugins
    AtrsClassWithoutPlugins.new.methods - Object.methods
  end

  def methods_class_with_clean_plugins
    AtrsClassWithCleanPlugins.new.methods - Object.methods
  end

  def methods_class_with_polution_allowed_plugins
    AtrsClassWithAllowedPolutingPlugins.new.methods - Object.methods
  end

  def test_without_plugins
    assert_equal [], methods_class_without_plugins.delete_if { |m| m.to_s[/^_/] }
  end

  def test_with_plugins
    assert_equal [], methods_class_with_clean_plugins.delete_if { |m| m.to_s[/^_/] }
  end
{'fraction_non_alphanumeric': 0.06732673267326733, 'fraction_numerical': 0.0, 'mean_word_length': 4.552197802197802, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3726121', 'n_tokens_mistral': 724, 'n_tokens_neox': 702, 'n_words': 116}