Changeset 412 for ruby/trunk/spec


Ignore:
Timestamp:
Apr 25, 2010, 5:21:15 PM (14 years ago)
Author:
KOBAYASHI, Shinji
Message:

implemented adl_serializer ontology spec

Location:
ruby/trunk/spec/lib/open_ehr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/spec/lib/open_ehr/am/archetype/ontology/archetype_ontology_spec.rb

    r411 r412  
    5252      code_string.should == '163020007'
    5353  end
     54
     55  it 'terminologies_available should return available terminology' do
     56    @archetype_ontology.terminologies_available.should == ['SNOMED-CT(2003)']
     57  end
    5458end
    5559                           
  • ruby/trunk/spec/lib/open_ehr/serializer/adl_serializer_spec.rb

    r411 r412  
    4040
    4141  it 'ontology should return ADL formatted ontology' do
    42     @adl_serializer.ontology.should == @sample_definition
     42    @adl_serializer.ontology.should == @sample_ontology
    4343  end
    4444end
  • ruby/trunk/spec/lib/open_ehr/serializer/sample_archetype_spec.rb

    r408 r412  
    99shared_examples_for 'sample archetype' do
    1010  before(:all) do
    11     terminologies_available = Set.new('ja')
    12     term_codes = ['at0000']
    13     archetype_term = ArchetypeTerm.new(:code => 'ja',
     11    archetype_term = ArchetypeTerm.new(:code => 'at0000',
    1412                                       :items => {'text' => 'simple test',
    1513                                         'description' => 'simple test for serializer'})
    16     term_definitions = {'ja' => {'at0000' => archetype_term}}
     14    term_definitions = {'ja' => [archetype_term]}
    1715    ontology =
    18       ArchetypeOntology.new(:terminologies_available => terminologies_available,
    19                             :specialisation_depth => 0,
    20                             :term_codes => term_codes,
    21                             :constraint_codes => [],
    22                             :term_attribute_names => ['text','description'],
     16      ArchetypeOntology.new(:specialisation_depth => 0,
    2317                            :term_definitions => term_definitions)
    2418    archetype_id = ArchetypeID.new(:value =>
Note: See TracChangeset for help on using the changeset viewer.