Sha256: 572d420cedeb23558de028d258747585a280af1b00434448039ff736059eef4b

Contents?: true

Size: 1.15 KB

Versions: 26

Compression:

Stored size: 1.15 KB

Contents

require File.dirname(__FILE__) + '/../../../../../spec_helper'
include OpenEHR::RM::Common::Generic

describe Participation do
  before(:each) do
    performer = stub(PartyProxy, :name => 'GEHIRN')
    function = stub(DvText, :value => 'committer')
    mode = stub(DvCodedText, :value => 'present')
    lower = stub(DvDateTime, :value => '2009-10-03T20:33:05')
    time = stub(DvInterval, :lower => lower)
    @participation = Participation.new(:performer => performer,
                                       :function => function,
                                       :mode => mode,
                                       :time => time)
  end

  it 'should be an instance of Participation' do
    @participation.should be_an_instance_of Participation
  end

  it 'should assign performer properly' do
    @participation.performer.name.should == 'GEHIRN'
  end

  it 'should assign function properly' do
    @participation.function.value.should == 'committer'
  end

  it 'should assign mode properly' do
    @participation.mode.value.should == 'present'
  end

  it 'should assign time properly' do
    @participation.time.lower.value.should == '2009-10-03T20:33:05'
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
open_ehr-0.9.4 spec/lib/open_ehr/rm/common/generic/participation_spec.rb
open_ehr-0.9.3 spec/lib/open_ehr/rm/common/generic/participation_spec.rb
open_ehr-0.9.2 spec/lib/open_ehr/rm/common/generic/participation_spec.rb
open_ehr-0.9.1 spec/lib/open_ehr/rm/common/generic/participation_spec.rb
open_ehr-0.9.0 spec/lib/open_ehr/rm/common/generic/participation_spec.rb
open_ehr-0.6.1 spec/lib/open_ehr/rm/common/generic/participation_spec.rb