<commit_before>require "zeamays"

describe "Zeamays Model example" do
  let(:example_cob_class) {
    class YellowSweet < Zeamays::Cob
      gene_sequencing :i8, :i16, :integer, :string
    end
    YellowSweet
  }

  let(:cob) { example_cob_class.new }
  let(:record1) { [30, 2000, 500000, "test"] }
  let(:record2) { [80, 1000, 200000, "Example!!! "] }
  before do
    cob.grow(record1)
    cob.grow(record2)
  end

  let(:packaged) { cob.pack }
  let(:unpackaged) { example_cob_class.unpack(packaged) }
  it { unpackaged.should eq [record1, record2] }

  describe "#defreeze" do
    let(:freezed) { cob.freezed }
    let(:defreezed) { example_cob_class.defreeze(freezed) }
    it { defreezed[0].should eq record1 }
    it { defreezed[1].should eq record2 }
  end
end<commit_msg>deprecated syntax `should` unused (zeamays_mode_example_spec.rb)<commit_after>require "zeamays"

describe "Zeamays Model example" do
  let(:example_cob_class) {
    class YellowSweet < Zeamays::Cob
      gene_sequencing :i8, :i16, :integer, :string
    end
    YellowSweet
  }

  let(:cob) { example_cob_class.new }
  let(:record1) { [30, 2000, 500000, "test"] }
  let(:record2) { [80, 1000, 200000, "Example!!! "] }
  before do
    cob.grow(record1)
    cob.grow(record2)
  end

  let(:packaged) { cob.pack }
  let(:unpackaged) { example_cob_class.unpack(packaged) }
  it { expect(unpackaged).to eq [record1, record2] }

  describe "#defreeze" do
    let(:freezed) { cob.freezed }
    let(:defreezed) { example_cob_class.defreeze(freezed) }
    it { expect(defreezed[0]).to eq record1 }
    it { expect(defreezed[1]).to eq record2 }
  end
end
{'fraction_non_alphanumeric': 0.1398644485520641, 'fraction_numerical': 0.04559457794208256, 'mean_word_length': 3.8622754491017965, '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': '3097131', 'n_tokens_mistral': 673, 'n_tokens_neox': 621, 'n_words': 125}