Sha256: 885156be8900788a5a1bcb0c4526f9642a1a939cc55963eb29f3123618796fc7

Contents?: true

Size: 1.36 KB

Versions: 26

Compression:

Stored size: 1.36 KB

Contents

require File.dirname(__FILE__) + '/../../../../../../spec_helper'
#require File.dirname(__FILE__) + '/shared_examples_spec'
include OpenEHR::RM::Composition::Content::Entry
include OpenEHR::RM::DataTypes::Text
include OpenEHR::RM::Common::Generic
include OpenEHR::RM::DataStructures::ItemStructure

describe AdminEntry do
  let(:name) {DvText.new(:value => 'entry package')}
  let(:language) { double('language',:code_string => 'ja')}
  let(:encoding) { double('encoding', :code_string => 'UTF-8')}
  let(:subject) { double('PartyProxy')}
#  it_should_behave_like 'entry'

  before(:each) do
    data = stub(ItemStructure, :archetype_node_id => 'at0002')
    @admin_entry = AdminEntry.new(:archetype_node_id => 'at0001',
                                  :name => DvText.new(:value => 'admin entry'),
                                  :language => language,
                                  :encoding => encoding,
                                  :subject => subject,
                                  :data => data)
  end

  it 'should be an instance of AdminEntry' do
    @admin_entry.should be_an_instance_of AdminEntry
  end

  it 'data should be assigned properly' do
    @admin_entry.data.archetype_node_id.should == 'at0002'
  end

  it 'should raise ArgumentError when nil assigned to data' do
    lambda {
      @admin_entry.data = nil
    }.should raise_error ArgumentError
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
openehr-1.2.8 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.2.7 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.2.6 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.2.5 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.2.4 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.2.3 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.2.2 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.2.1 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.2.0 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.1.6 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.1.5 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.1.4 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.1.3 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.1.2 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.1.1 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
openehr-1.1.0 spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/rm/composition/content/entry/admin_entry_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/rm/composition/content/entry/admin_entry_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/rm/composition/content/entry/admin_entry_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/rm/composition/content/entry/admin_entry_spec.rb