<commit_before>require 'minitest/autorun'
require 'sequel'

class TransformerTest < Minitest::Test
  def setup
    @db = Sequel.sqlite
    @db.extension :transformer
  end

  def test_transformer_yields_chain
    yielded = nil
    @db.transformer { |arg| yielded = arg }
    assert_instance_of Sequel::Transformer::Chain, yielded<commit_msg>Clear event subscribers between tests<commit_after>require 'minitest/autorun'
require 'sequel'

class TransformerTest < Minitest::Test
  def setup
    @db = Sequel.sqlite
    @db.extension :transformer
    ActiveSupport::Notifications.notifier = ActiveSupport::Notifications.notifier.class.new
  end

  def test_transformer_yields_chain
    yielded = nil
    @db.transformer { |arg| yielded = arg }
    assert_instance_of Sequel::Transformer::Chain, yielded
{'fraction_non_alphanumeric': 0.08646616541353383, 'fraction_numerical': 0.0, 'mean_word_length': 4.707142857142857, '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': '5903166', 'n_tokens_mistral': 258, 'n_tokens_neox': 249, 'n_words': 55}