Sha256: 1279ef38c73b741a00dcb2ff372364c33137a062fb862af8798140428a266bbe
Contents?: true
Size: 909 Bytes
Versions: 21
Compression:
Stored size: 909 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 describe '#get_attribute' do before do operation_info.add_attribute(Moneta::Api::Types::KeyValueAttribute.new.fill(key: 'key', value: 'value')) end subject { operation_info.get_attribute('key') } it { is_expected.to be_a Moneta::Api::Types::KeyValueAttribute } end end
Version data entries
21 entries across 21 versions & 1 rubygems