source: ruby/trunk/spec/lib/open_ehr/rm/composition/content/entry/evaluation_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.0 KB
Line 
1require File.dirname(__FILE__) + '/../../../../../../spec_helper'
2require File.dirname(__FILE__) + '/shared_examples_spec'
3include OpenEHR::RM::DataStructures::ItemStructure
4include OpenEHR::RM::Composition::Content::Entry
5
6describe Evaluation do
7 it_should_behave_like 'entry'
8
9 before(:each) do
10 data = stub(ItemStructure, :archetype_node_id => 'at0002')
11 @evaluation = Evaluation.new(:archetype_node_id => 'at0001',
12 :name => @name,
13 :language => @language,
14 :encoding => @encoding,
15 :subject => @subject,
16 :data => data)
17 end
18
19 it 'should be an instance of Evaluation' do
20 @evaluation.should be_an_instance_of Evaluation
21 end
22
23 it 'data should be properly assigned' do
24 @evaluation.data.archetype_node_id.should == 'at0002'
25 end
26
27 it 'should raise ArgumentError when nil assigned to data' do
28 lambda {
29 @evaluation.data = nil
30 }.should raise_error ArgumentError
31 end
32end
Note: See TracBrowser for help on using the repository browser.