<commit_before>require 'test_helper'
require "superstore/railties/controller_runtime"

class Superstore::Railties::ControllerRuntimeTest < MiniTest::Unit::TestCase
  class TestRuntime
    def self.log_process_action(payload)
      ['sweet']
    end

    def cleanup_view_runtime
      12
    end

    def append_info_to_payload(payload)
      payload[:foo] = 42
    end
  end

  class CassandraRuntime < TestRuntime
    include Superstore::Railties::ControllerRuntime
  end

  def test_cleanup_view_runtime
    runtime = CassandraRuntime.new
    Superstore::LogSubscriber.runtime = 10

    runtime.cleanup_view_runtime

    assert_equal 0, Superstore::LogSubscriber.runtime
  end<commit_msg>Fix minitest deprecation warning<commit_after>require 'test_helper'
require "superstore/railties/controller_runtime"

class Superstore::Railties::ControllerRuntimeTest < MiniTest::Test
  class TestRuntime
    def self.log_process_action(payload)
      ['sweet']
    end

    def cleanup_view_runtime
      12
    end

    def append_info_to_payload(payload)
      payload[:foo] = 42
    end
  end

  class CassandraRuntime < TestRuntime
    include Superstore::Railties::ControllerRuntime
  end

  def test_cleanup_view_runtime
    runtime = CassandraRuntime.new
    Superstore::LogSubscriber.runtime = 10

    runtime.cleanup_view_runtime

    assert_equal 0, Superstore::LogSubscriber.runtime
  end
{'fraction_non_alphanumeric': 0.06613946800862688, 'fraction_numerical': 0.010064701653486701, 'mean_word_length': 4.1940298507462686, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6951583', 'n_tokens_mistral': 426, 'n_tokens_neox': 394, 'n_words': 82}