Last change
on this file since 411 was 411, checked in by KOBAYASHI, Shinji, 14 years ago |
fixed archetype ontology bugs
|
File size:
1.3 KB
|
Line | |
---|
1 | require File.dirname(__FILE__) + '/../../../spec_helper'
|
---|
2 | require File.dirname(__FILE__) + '/sample_archetype_spec'
|
---|
3 | include OpenEHR::Serializer
|
---|
4 | include OpenEHR::AM::Archetype
|
---|
5 | include OpenEHR::RM::Support::Identification
|
---|
6 |
|
---|
7 | describe ADLSerializer do
|
---|
8 | it_should_behave_like 'sample archetype'
|
---|
9 |
|
---|
10 | before(:all) do
|
---|
11 | current_dir = File.dirname(__FILE__)
|
---|
12 | adl_file = File.open(current_dir + '/openEHR-EHR-SECTION.test.v1.adl')
|
---|
13 | adl = adl_file.readlines
|
---|
14 | @sample_header = adl[0..7].join
|
---|
15 | @sample_description = adl[9..22].join
|
---|
16 | @sample_definition = adl[24..25].join
|
---|
17 | @sample_ontology = adl[27..37].join
|
---|
18 | adl_file.close
|
---|
19 | end
|
---|
20 |
|
---|
21 | before(:each) do
|
---|
22 | @adl_serializer = ADLSerializer.new(@archetype)
|
---|
23 | end
|
---|
24 |
|
---|
25 | it 'should be an instance of ADLSerializer' do
|
---|
26 | @adl_serializer.should be_an_instance_of ADLSerializer
|
---|
27 | end
|
---|
28 |
|
---|
29 | it 'header should return archetype context' do
|
---|
30 | @adl_serializer.header.should == @sample_header
|
---|
31 | end
|
---|
32 |
|
---|
33 | it 'description should return archetype description' do
|
---|
34 | @adl_serializer.description.should == @sample_description
|
---|
35 | end
|
---|
36 |
|
---|
37 | it 'definition should return ADL formatted definition' do
|
---|
38 | @adl_serializer.definition.should == @sample_definition
|
---|
39 | end
|
---|
40 |
|
---|
41 | it 'ontology should return ADL formatted ontology' do
|
---|
42 | @adl_serializer.ontology.should == @sample_definition
|
---|
43 | end
|
---|
44 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.