Sha256: 152bb466442151e60d0a8884ecb960784fda7d5cd62c73e493d9d4be427b1f4e

Contents?: true

Size: 816 Bytes

Versions: 26

Compression:

Stored size: 816 Bytes

Contents

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

describe AssertionVariable do
  before(:each) do
    @assertion_variable =
      AssertionVariable.new(:name => 'test',
                            :definition => 'examine spec')
  end

  it 'name should be assigned properly' do
    @assertion_variable.name.should == 'test'
  end

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

  it 'definition should be assigned properly' do
    @assertion_variable.definition.should == 'examine spec'
  end

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