<commit_before>describe Unidom::Inventory::SerializedInventoryItem, type: :model do

  before :each do
  end

  after :each do
  end

  context do

    model_attributes = {
      stored_id:     SecureRandom.uuid,
      stored_type:   'Unidom::Inventory::Stored::Mock',
      store_id:      SecureRandom.uuid,
      store_type:    'Unidom::Inventory::Store::Mock',
      lot_id:        SecureRandom.uuid,
      serial_number: '123456789012'
    }

    it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes

    it_behaves_like 'validates text', model_attributes, :serial_number,
      length: 2..described_class.columns_hash['serial_number'].limit

  end

end<commit_msg>1, Improve the Serialized Inventory Item spec for the As Inventory Item concern.<commit_after>require 'rspec/models/unidom/inventory/concerns/as_inventory_item_shared_examples'

describe Unidom::Inventory::SerializedInventoryItem, type: :model do

  before :each do
  end

  after :each do
  end

  context do

    model_attributes = {
      stored_id:     SecureRandom.uuid,
      stored_type:   'Unidom::Inventory::Stored::Mock',
      store_id:      SecureRandom.uuid,
      store_type:    'Unidom::Inventory::Store::Mock',
      lot_id:        SecureRandom.uuid,
      serial_number: '123456789012'
    }

    it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes

    it_behaves_like 'validates text', model_attributes, :serial_number,
      length: 2..described_class.columns_hash['serial_number'].limit

    it_behaves_like 'Unidom::Inventory::Concerns::AsInventoryItem', model_attributes

  end

end
{'fraction_non_alphanumeric': 0.09858287122612445, 'fraction_numerical': 0.0166358595194085, 'mean_word_length': 3.98159509202454, 'pattern_counts': {'":': 0, '<': 3, '<?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': '679040', 'n_tokens_mistral': 565, 'n_tokens_neox': 517, 'n_words': 96}