Sha256: 092dbc6ee2006efd9a7537a821963aa37ddcde025ecd83480c5f71736822bea8

Contents?: true

Size: 910 Bytes

Versions: 26

Compression:

Stored size: 910 Bytes

Contents

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

describe ExprLeaf do
  before(:each) do
    @expr_leaf = ExprLeaf.new(:type => 'Boolean',
                              :item => 'ANY',
                              :reference_type => 'DV_TEXT')
  end

  it 'should be an instance of ExprLeaf' do
    @expr_leaf.should be_an_instance_of ExprLeaf
  end

  it 'item should be assigned properly' do
    @expr_leaf.item.should == 'ANY'
  end

  it 'should raise ArgumentError when item is nil' do
    lambda {
      @expr_leaf.item = nil
    }.should raise_error ArgumentError
  end

  it 'reference_type should be assigned properly' do
    @expr_leaf.reference_type.should == 'DV_TEXT'
  end

  it 'should raise ArgumentError when reference_type is nil' do
    lambda {
      @expr_leaf.reference_type = 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/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.2.7 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.2.6 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.2.5 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.2.4 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.2.3 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.2.2 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.2.1 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.2.0 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.1.6 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.1.5 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.1.4 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.1.3 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.1.2 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.1.1 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
openehr-1.1.0 spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/am/archetype/assertion/expr_leaf_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/am/archetype/assertion/expr_leaf_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/am/archetype/assertion/expr_leaf_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/am/archetype/assertion/expr_leaf_spec.rb