source: ruby/trunk/spec/lib/open_ehr/am/archetype/assertion/expr_item_spec.rb@ 384

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

refs #73

File size: 673 bytes
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEHR::AM::Archetype::Assertion
3
4describe ExprItem do
5 before(:each) do
6 @expr_item = ExprItem.new(:type => 'Real')
7 end
8
9 it 'should be an instance of ExprItem' do
10 @expr_item.should be_an_instance_of ExprItem
11 end
12
13 it 'type should be assigned properly' do
14 @expr_item.type.should == 'Real'
15 end
16
17 it 'should raise ArgumentError when type is nil' do
18 lambda {
19 @expr_item.type = nil
20 }.should raise_error ArgumentError
21 end
22
23 it 'should raise ArgumentError when type is empty' do
24 lambda {
25 @expr_item.type = ''
26 }.should raise_error ArgumentError
27 end
28end
Note: See TracBrowser for help on using the repository browser.