<commit_before># -*- encoding: utf-8 -*-

require 'spec_helper'

describe TTY::Table::Operations, '#new' do
  let(:object) { described_class }
  let(:row) { [1,2,3] }
  let(:table) { TTY::Table.new :rows => [row] }
  let(:callable) {
    Class.new do
      def call(row, options)
        row.map! { |r| r + 1}
      end
    end
  }
  let(:instance) { callable.new }

  subject { object.new table }

  before {
    subject.add_operation(:alignment, instance)
  }

  it 'stores away operations' do
    expect(subject.operations).to eql({:alignment => [instance]})
  end
<commit_msg>Fix ci test.<commit_after># -*- encoding: utf-8 -*-

require 'spec_helper'

describe TTY::Table::Operations, '#new' do
  let(:object) { described_class }
  let(:row) { [1,2,3] }
  let(:table) { TTY::Table.new :rows => [row] }
  let(:callable) {
    Class.new do
      def call(row, options)
        row.map! { |r| r + 1}
      end
    end
  }
  let(:instance) { callable.new }

  subject { object.new table }

  before {
    subject.add_operation(:alignment, instance)
  }

  it 'stores away operations' do
    expect(subject.operations[:alignment]).to include(instance)
  end

{'fraction_non_alphanumeric': 0.1633535004321521, 'fraction_numerical': 0.00864304235090752, 'mean_word_length': 3.0489510489510487, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '4212839', 'n_tokens_mistral': 419, 'n_tokens_neox': 406, 'n_words': 93}