source: ruby/trunk/spec/lib/open_ehr/rm/common/generic/participation_spec.rb@ 369

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

merge from branches/0.5

File size: 1.2 KB
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEHR::RM::Common::Generic
3
4describe Participation do
5 before(:each) do
6 performer = stub(PartyProxy, :name => 'GEHIRN')
7 function = stub(DvText, :value => 'committer')
8 mode = stub(DvCodedText, :value => 'present')
9 lower = stub(DvDateTime, :value => '2009-10-03T20:33:05')
10 time = stub(DvInterval, :lower => lower)
11 @participation = Participation.new(:performer => performer,
12 :function => function,
13 :mode => mode,
14 :time => time)
15 end
16
17 it 'should be an instance of Participation' do
18 @participation.should be_an_instance_of Participation
19 end
20
21 it 'should assign performer properly' do
22 @participation.performer.name.should == 'GEHIRN'
23 end
24
25 it 'should assign function properly' do
26 @participation.function.value.should == 'committer'
27 end
28
29 it 'should assign mode properly' do
30 @participation.mode.value.should == 'present'
31 end
32
33 it 'should assign time properly' do
34 @participation.time.lower.value.should == '2009-10-03T20:33:05'
35 end
36end
Note: See TracBrowser for help on using the repository browser.