Sha256: c4b0ab5e05314cf5f5ca00d6607969e6f8c48f1fb4dd1cb4c1035bfa57d2fcd9

Contents?: true

Size: 1.07 KB

Versions: 26

Compression:

Stored size: 1.07 KB

Contents

require File.dirname(__FILE__) + '/../../../../../spec_helper'
include OpenEHR::RM::Common::Archetyped
include OpenEHR::RM::DataTypes::Text
include OpenEHR::RM::DataTypes::URI

describe Link do
  before(:each) do
    @link = Link.new(:meaning => DvText.new(:value => 'generic'),
                     :type => DvText.new(:value => 'problem'),
                     :target => DvEhrUri.new(:value => 'ehr://test'))
  end

  it 'should be an instance of Link' do
    @link.should be_an_instance_of Link
  end

  it 'meaning should be generic' do
    @link.meaning.value.should == 'generic'
  end

  it 'target should be ehr://test' do
    @link.target.value.should == 'ehr://test'
  end

  it 'should raise ArgumentError with nil meaning' do
    lambda {
      @link.meaning = nil
    }.should raise_error ArgumentError
  end

  it 'should raise ArgumentError with nil type' do
    lambda {
      @link.type = nil
    }.should raise_error ArgumentError
  end

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