Sha256: 50e4adb5fd3090d6fefec85f9aae857af7252b5656a129fe4f7263884053a035

Contents?: true

Size: 926 Bytes

Versions: 26

Compression:

Stored size: 926 Bytes

Contents

require File.dirname(__FILE__) + '/../../../../spec_helper'
include OpenEHR::RM::Demographic
include OpenEHR::RM::DataTypes::Text
include OpenEHR::RM::DataStructures::ItemStructure

describe Address do
  before(:each) do
    name = DvText.new(:value => 'address')
    details = stub(ItemStructure, :archetype_node_id => 'at0001')
    @address = Address.new(:archetype_node_id => 'at0000',
                           :name => name,
                           :details => details)
  end

  it 'should be an instance of Address' do
    @address.should be_an_instance_of Address
  end

  it 'type is inherit from name' do
    @address.type.value.should == 'address'
  end

  it 'details should be assigned properly' do
    @address.details.archetype_node_id.should == 'at0001'
  end

  it 'should raise ArgumentError with nil details' do
    lambda {
      @address.details = 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/demographic/address_spec.rb
openehr-1.2.7 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.2.6 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.2.5 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.2.4 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.2.3 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.2.2 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.2.1 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.2.0 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.1.6 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.1.5 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.1.4 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.1.3 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.1.2 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.1.1 spec/lib/openehr/rm/demographic/address_spec.rb
openehr-1.1.0 spec/lib/openehr/rm/demographic/address_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/rm/demographic/address_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/rm/demographic/address_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/rm/demographic/address_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/rm/demographic/address_spec.rb