Sha256: e04d83b4a529231d6ed1ece56646e38a70226f98c3ee55b4997f2bf3788fb66e
Contents?: true
Size: 1001 Bytes
Versions: 1
Compression:
Stored size: 1001 Bytes
Contents
#require File.dirname(__FILE__) + '/../../../../../../spec_helper' require 'spec_helper' #include include OpenEHR::RM::DataTypes::Text describe OpenEHR::RM::Composition::Content::Navigation::Section do before(:each) do items = stub(Array, :empty? => false, :size => 10) @section = OpenEHR::RM::Composition::Content::Navigation::Section.new( :archetype_node_id => 'at0001', :name => DvText.new(:value => 'section'), :items => items) end it 'should be an instance of Section' do @section.should be_an_instance_of Section end it 'items should be assigned properly' do @section.items.size.should be_equal 10 end it 'empty items should raise ArgumentError' do lambda { @section.items = [ ] }.should raise_error ArgumentError end it 'nil items should not raise ArgumentError' do lambda { @section.items = nil }.should_not raise_error ArgumentError end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
openehr-1.2.8 | spec/lib/openehr/rm/composition/content/navigation/section_spec.rb |