Sha256: a330947ff7f45abfc7389a2df9486db0017b831a1d54958fed6da4ad6fbe2a10
Contents?: true
Size: 986 Bytes
Versions: 1
Compression:
Stored size: 986 Bytes
Contents
require File.dirname(__FILE__) + '/../../../../../spec_helper' include OpenEHR::AM::Archetype::ConstraintModel include OpenEHR::AssumedLibraryTypes describe CMultipleAttribute do before(:each) do existence = Interval.new(:upper =>0, :lower => 0) cardinality = stub(Cardinality, :ordered? => true) @c_multiple_attribute = CMultipleAttribute.new(:path => '/event/at001', :rm_attribute_name => 'DV_DATE', :existence => existence, :cardinality => cardinality) end it 'should be an instance of CMulitipleAttribute' do @c_multiple_attribute.should be_an_instance_of CMultipleAttribute end it 'cardinality should be assigned properly' do @c_multiple_attribute.cardinality.should be_ordered end it 'should raise ArgumentError when cardinality is nil' do lambda { @c_multiple_attribute.cardinality = nil }.should raise_error ArgumentError end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
open_ehr-0.6.1 | spec/lib/open_ehr/am/archetype/constraint_model/c_multiple_attribute_spec.rb |