<commit_before>require 'spec_helper'

describe Myparcel::Models::CustomObject do
  describe 'attributes' do

    subject(:custom_object) do
      described_class.new \
        description: 'Foo',
        amount: 1,
        weight: 500,
        item_value: { amount: 500, currency: 'EUR' },
        classification: '1',
        country: 'NL'
    end

    describe '#description' do
      it 'defines correct method' do
        expect(custom_object.description).to eq 'Foo'
      end
    end

    describe '#amount' do
      it 'defines correct method' do
        expect(custom_object.amount).to eq 1
      end
    end

    describe '#weight' do
      it 'defines correct method' do
        expect(custom_object.weight).to eq 500
      end
    end

    describe '#item_value' do
      it 'defines correct method' do
        expect(custom_object.item_value.amount).to eq 500
        expect(custom_object.item_value.currency).to eq 'EUR'
      end
    end<commit_msg>added type spec<commit_after>require 'spec_helper'

describe Myparcel::Models::CustomObject do
  describe 'attributes' do
    subject(:custom_object) do
      described_class.new \
        description: 'Foo',
        amount: 1,
        weight: 500,
        item_value: { amount: 500, currency: 'EUR' },
        classification: '1',
        country: 'NL'
    end

    describe '#description' do
      it 'defines correct method' do
        expect(custom_object.description).to eq 'Foo'
      end
    end

    describe '#amount' do
      it 'defines correct method' do
        expect(custom_object.amount).to eq 1
      end
    end

    describe '#weight' do
      it 'defines correct method' do
        expect(custom_object.weight).to eq 500
      end
    end

    describe '#item_value' do
      it 'is a Price' do
        expect(custom_object.item_value).to be_a Myparcel::Models::Price
      end

      it 'defines correct method' do
        expect(custom_object.item_value.amount).to eq 500
        expect(custom_object.item_value.currency).to eq 'EUR'
      end
    end
{'fraction_non_alphanumeric': 0.0893909626719057, 'fraction_numerical': 0.014734774066797643, 'mean_word_length': 2.339344262295082, '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': '5384410', 'n_tokens_mistral': 634, 'n_tokens_neox': 589, 'n_words': 174}