source: ruby/trunk/spec/lib/open_ehr/am/archetype/assertion/assertion_variable_spec.rb@ 390

Last change on this file since 390 was 390, checked in by KOBAYASHI, Shinji, 14 years ago

fixed #73

File size: 816 bytes
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEHR::AM::Archetype::Assertion
3
4describe AssertionVariable do
5 before(:each) do
6 @assertion_variable =
7 AssertionVariable.new(:name => 'test',
8 :definition => 'examine spec')
9 end
10
11 it 'name should be assigned properly' do
12 @assertion_variable.name.should == 'test'
13 end
14
15 it 'should raise ArgumentError when name is nil' do
16 lambda {
17 @assertion_variable.name = nil
18 }.should raise_error ArgumentError
19 end
20
21 it 'definition should be assigned properly' do
22 @assertion_variable.definition.should == 'examine spec'
23 end
24
25 it 'should raise ArgumentError if definiton is nil' do
26 lambda {
27 @assertion_variable.definition = nil
28 }.should raise_error ArgumentError
29 end
30end
Note: See TracBrowser for help on using the repository browser.