source: ruby/trunk/spec/lib/open_ehr/serializer/xml_serializer_spec.rb@ 407

Last change on this file since 407 was 407, checked in by KOBAYASHI, Shinji, 14 years ago

serializer implementation
Sample ADL was generated by LiU Archetype Editor.
There are some differences in XML forms amongs LiU, Ocean, CKM.

File size: 775 bytes
Line 
1require File.dirname(__FILE__) + '/../../../spec_helper'
2require File.dirname(__FILE__) + '/sample_archetype_spec'
3require 'rexml/document'
4include OpenEHR::Serializer
5
6describe XMLSerializer do
7 it_should_behave_like 'sample archetype'
8
9 before(:each) do
10 @xml_serializer = XMLSerializer.new(@archetype)
11 end
12
13 it 'should be an instance of XMLSerializer' do
14 @xml_serializer.should be_an_instance_of XMLSerializer
15 end
16
17 it 'should return XML formatted header' do
18 @xml_serializer.header.should == <<END
19<archetype_id>
20 <value>openEHR-EHR-SECTION.test.v1</value>
21</archetype_id>
22<concept>at0000</concept>
23<original_language>
24 <code_string>ja</code_string>
25 <terminology_id>
26 <value>openEHR</value>
27 </terminology_id>
28</original_language>
29END
30 end
31end
Note: See TracBrowser for help on using the repository browser.