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

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

serializer implementation

File size: 639 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>adl-test-ENTRY.most_minimal.v1</value>
21</archetype_id>
22<concept>at0000</concept>
23END
24 end
25end
Note: See TracBrowser for help on using the repository browser.