Sha256: 606265bc67d34b7c1bdd4ebc44c6ed224fa47bffe4ed1514e17e50d9f52276c8

Contents?: true

Size: 1.13 KB

Versions: 26

Compression:

Stored size: 1.13 KB

Contents

require File.dirname(__FILE__) + '/../../../../../spec_helper'
include OpenEHR::AM::Archetype::ConstraintModel
include OpenEHR::AM::Archetype::ConstraintModel::Primitive
include OpenEHR::AssumedLibraryTypes

describe CPrimitiveObject do
  before(:each) do
    interval = Interval.new(:lower => 0, :upper => 1)
    item = stub(CPrimitive, :node_id => 'at0001')
    @c_primitive_object = CPrimitiveObject.new(:path => 'event/test',
                                               :rm_type_name => 'DV_TEXT',
                                               :node_id => 'ac0001',
                                               :occurrences => interval,
                                               :item => item)
  end

  it 'should be an instance of CPrimitiveObject' do
    @c_primitive_object.should be_an_instance_of CPrimitiveObject
  end

  it 'item should be assigned properly' do
    @c_primitive_object.item.node_id.should == 'at0001'
  end

  it 'should allowed any' do
    @c_primitive_object.should_not be_any_allowed
  end

  it 'should not any allowed' do
    @c_primitive_object.item = nil
    @c_primitive_object.should be_any_allowed
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
openehr-1.2.8 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.2.7 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.2.6 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.2.5 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.2.4 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.2.3 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.2.2 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.2.1 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.2.0 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.1.6 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.1.5 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.1.4 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.1.3 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.1.2 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.1.1 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
openehr-1.1.0 spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/am/archetype/constraint_model/c_primitive_object_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/am/archetype/constraint_model/c_primitive_object_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/am/archetype/constraint_model/c_primitive_object_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/am/archetype/constraint_model/c_primitive_object_spec.rb