Sha256: d2fd6c0862b6b2b83964413c9b875bbfffb85a4a5ee06ffcbb4da20600817405

Contents?: true

Size: 846 Bytes

Versions: 25

Compression:

Stored size: 846 Bytes

Contents

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

describe CSingleAttribute do
  before(:each) do
    existence = Interval.new(:upper =>0, :lower => 0) 
    alternatives = stub(Array, :size => 5)
    @c_single_attribute = CSingleAttribute.new(:path => '/event/at001',
                                              :rm_attribute_name => 'DV_DATE',
                                              :existence => existence,
                                              :alternatives => alternatives)
  end

  it 'should be an instance of CSingleAttribute' do
    @c_single_attribute.should be_an_instance_of CSingleAttribute
  end

  it 'alternative should be assigned properly' do
    @c_single_attribute.alternatives.size.should be_equal 5
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
open_ehr-0.9.4 spec/lib/open_ehr/am/archetype/constraint_model/c_single_attribute_spec.rb
open_ehr-0.9.3 spec/lib/open_ehr/am/archetype/constraint_model/c_single_attribute_spec.rb
open_ehr-0.9.2 spec/lib/open_ehr/am/archetype/constraint_model/c_single_attribute_spec.rb
open_ehr-0.9.1 spec/lib/open_ehr/am/archetype/constraint_model/c_single_attribute_spec.rb
open_ehr-0.9.0 spec/lib/open_ehr/am/archetype/constraint_model/c_single_attribute_spec.rb