Line | |
---|
1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
2 | include OpenEHR::AM::Archetype::Assertion
|
---|
3 |
|
---|
4 | describe 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
|
---|
28 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.