<commit_before>require "spec_helper"

describe UOB::Payroll::TXTFile::Row do

  subject(:row) { described_class.new params }
  let(:string_version) { row.to_s }

  let(:params) {
    {
      bic_code: 'UOVBSGSG351',
      account_number: '3513220403',
      account_name: '<NAME>',
      amount: 43.35
    }
  }

  let(:expected_content) { File.read 'spec/fixtures/row_sample.txt'}

  it { expect(string_version).to eq expected_content }
end<commit_msg>add new test to encounter the error from 2019<commit_after>require "spec_helper"

describe UOB::Payroll::TXTFile::Row do

  subject(:row) { described_class.new params }
  let(:string_version) { row.to_s }

  let(:params) {
    {
      bic_code: 'UOVBSGSG351',
      account_number: '3513220403',
      account_name: '<NAME>',
      amount: 43.35
    }
  }

  let(:expected_content) { File.read 'spec/fixtures/row_sample.txt'}

  it { expect(string_version).to eq expected_content }

  describe "formatted_amount" do
    let(:params) {
      {
       bic_code: 'UOVBSGSG351',
       account_number: '3513220403',
       account_name: '<NAME>',
       amount: "2000.565"
      }
    }

    it "returns a proper value" do
      expect(row.formatted_amount).to eq "0000000200057"
    end
  end
end
{'fraction_non_alphanumeric': 0.1276083467094703, 'fraction_numerical': 0.05698234349919743, 'mean_word_length': 3.227118644067797, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '2217321', 'n_tokens_mistral': 496, 'n_tokens_neox': 431, 'n_words': 84}