Changeset 355 for ruby


Ignore:
Timestamp:
Nov 17, 2009, 9:57:37 PM (14 years ago)
Author:
KOBAYASHI, Shinji
Message:

refs #57 CareEntry

Location:
ruby/branches/0.5
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/lib/open_ehr/rm/composition/content/entry.rb

    r354 r355  
    5757          end
    5858          class CareEntry < Entry
    59            
     59            attr_accessor :protocol, :guideline_id
     60
     61            def initialize(args = { })
     62              super(args)
     63              self.protocol = args[:protocol]
     64              self.guideline_id = args[:guideline_id]
     65            end
    6066          end
    6167         
  • ruby/branches/0.5/spec/lib/open_ehr/rm/composition/content/entry/admin_entry_spec.rb

    r354 r355  
    11require File.dirname(__FILE__) + '/../../../../../../spec_helper'
     2require File.dirname(__FILE__) + '/shared_examples_spec'
    23include OpenEHR::RM::Composition::Content::Entry
    34include OpenEHR::RM::DataTypes::Text
     
    67
    78describe AdminEntry do
     9  it_should_behave_like 'entry'
     10
    811  before(:each) do
    9     language = stub(CodePhrase)
    10     encoding = stub(CodePhrase)
    11     subject = stub(PartyProxy)
    1212    data = stub(ItemStructure, :archetype_node_id => 'at0002')
    1313    @admin_entry = AdminEntry.new(:archetype_node_id => 'at0001',
    1414                                  :name => DvText.new(:value => 'admin entry'),
    15                                   :language => language,
    16                                   :encoding => encoding,
    17                                   :subject => subject,
     15                                  :language => @language,
     16                                  :encoding => @encoding,
     17                                  :subject => @subject,
    1818                                  :data => data)
    1919  end
  • ruby/branches/0.5/spec/lib/open_ehr/rm/composition/content/entry/entry_spec.rb

    r353 r355  
    11require File.dirname(__FILE__) + '/../../../../../../spec_helper'
     2require File.dirname(__FILE__) + '/shared_examples_spec'
    23include OpenEHR::RM::Composition::Content::Entry
    34include OpenEHR::RM::DataTypes::Text
     
    56
    67describe Entry do
     8  it_should_behave_like 'entry'
     9
    710  before(:each) do
    8     language = stub(CodePhrase, :code_string => 'ja')
    9     encoding = stub(CodePhrase, :code_string => 'UTF-8')
    1011    external_ref = stub(PartyRef, :type => 'entry')
    1112    subject = PartyProxy.new(:external_ref => external_ref)
     
    1617    @entry = Entry.new(:archetype_node_id => 'at0001',
    1718                       :name => DvText.new(:value => 'entry test'),
    18                        :language => language,
    19                        :encoding => encoding,
     19                       :language => @language,
     20                       :encoding => @encoding,
    2021                       :subject => subject,
    2122                       :provider => provider,
Note: See TracChangeset for help on using the changeset viewer.