Sha256: 26bbde51f6e22bb2fc1cdba44fca674021436e3fd62de1f614b9aab0781b9699

Contents?: true

Size: 615 Bytes

Versions: 10

Compression:

Stored size: 615 Bytes

Contents

describe Moneta::Api::Types::OperationInfo do
  let(:operation_info) { described_class.new }

  describe '#add_attribute' do
    subject {
      operation_info.attribute
      operation_info.add_attribute(item)
      operation_info.attribute
    }

    context 'when item instance of Moneta::Api::Types::KeyValueAttribute' do
      let(:item) { Moneta::Api::Types::KeyValueAttribute.new.fill(key: 'key', value: 'value') }

      its(:count) { is_expected.to eq 1 }
    end

    context 'when wrong item' do
      let(:item) { String.new }

      it { expect{ subject }.to raise_error(TypeError) }
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
moneta-api-1.4.0 spec/lib/moneta/api/types/operation_info_spec.rb
moneta-api-1.3.0 spec/lib/moneta/api/types/operation_info_spec.rb
moneta-api-1.2.1 spec/lib/moneta/api/types/operation_info_spec.rb
moneta-api-1.2.0 spec/lib/moneta/api/types/operation_info_spec.rb
moneta-api-1.1.0 spec/lib/moneta/api/types/operation_info_spec.rb
moneta-api-1.0.4 spec/lib/moneta/api/types/operation_info_spec.rb
moneta-api-1.0.3 spec/lib/moneta/api/types/operation_info_spec.rb
moneta-api-1.0.2 spec/lib/moneta/api/types/operation_info_spec.rb
moneta-api-1.0.1 spec/lib/moneta/api/types/operation_info_spec.rb
moneta-api-1.0.0 spec/lib/moneta/api/types/operation_info_spec.rb