source: ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/party_identified_spec.rb@ 312

Last change on this file since 312 was 312, checked in by KOBAYASHI, Shinji, 15 years ago

commit from amsterdam

File size: 920 bytes
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEHR::RM::Common::Generic
3
4describe PartyIdentified do
5 before(:each) do
6 external_ref = stub(PartyRef, :namespace => 'unknown')
7 identifiers = stub(Array, :size => 5, :empty? => false)
8 @party_identified = PartyIdentified.new(:name => 'NERV',
9 :external_ref => external_ref,
10 :identifier => identifiers)
11 end
12
13 it 'should be an instance of PartyIdentified' do
14 @party_identified.should be_an_instance_of PartyIdentified
15 end
16
17 it 'should assign name properly' do
18 @party_identified.name.should == 'NERV'
19 end
20
21 it 'should assign external_ref properly' do
22 @party_identified.external_ref.namespace.should == 'unknown'
23 end
24
25 it 'should assign identifier properly' do
26 @party_identified.identifier.size.should be_equal 5
27 end
28end
Note: See TracBrowser for help on using the repository browser.