require File.dirname(__FILE__) + '/../../../spec_helper' require File.dirname(__FILE__) + '/sample_archetype_spec' include OpenEHR::Serializer include OpenEHR::AM::Archetype include OpenEHR::RM::Support::Identification describe ADLSerializer do it_should_behave_like 'sample archetype' before(:all) do current_dir = File.dirname(__FILE__) adl_file = File.open(current_dir + '/openEHR-EHR-SECTION.test.v1.adl') adl = adl_file.readlines @sample_header = adl[0..7].join @sample_description = adl[9..22].join adl_file.close end before(:each) do @adl_serializer = ADLSerializer.new(@archetype) end it 'should be an instance of ADLSerializer' do @adl_serializer.should be_an_instance_of ADLSerializer end it 'header should return archetype context' do @adl_serializer.header.should == @sample_header end it 'description should return archetype description' do @adl_serializer.description.should == @sample_description end end