Changeset 413 for ruby/trunk/spec


Ignore:
Timestamp:
May 22, 2010, 12:57:55 PM (14 years ago)
Author:
KOBAYASHI, Shinji
Message:

My X window system corrupsed.
However, only character is not so bad.

Location:
ruby/trunk/spec/lib/open_ehr/serializer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/spec/lib/open_ehr/serializer/openEHR-EHR-SECTION.test.v1.xml

    r410 r413  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version='1.0' encoding='UTF-8'?>
    22<archetype xmlns="http://schemas.openehr.org/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    33  <archetype_id>
  • ruby/trunk/spec/lib/open_ehr/serializer/xml_serializer_spec.rb

    r410 r413  
    1919    @sample_description = xml.unindent(12, 27, 2)
    2020    @sample_definition = xml.unindent(28, 37, 2)
     21    @sample_ontology = xml.unindent(38, 56, 2)
     22    @sample_xml = xml.join
    2123    xml_file.close
    2224  end
     
    4244  end
    4345
    44   def unindent(lines,n)
    45     return lines.collect{|line| line[n..-1]}.join
     46  it 'should return XML formatted ontology' do
     47    @xml_serializer.ontology.should == @sample_ontology
     48  end
     49
     50  it 'should equal sample hash' do
     51    hashed_xml = Hash.from_xml @xml_serializer.serialize
     52    archetype_hash = hashed_xml['archetype']
     53    hashed_sample = Hash.from_xml @sample_xml
     54    sample_hash = hashed_sample['archetype']
     55    archetype_hash.should be_eql sample_hash
    4656  end
    4757end
Note: See TracChangeset for help on using the changeset viewer.