Rev | Line | |
---|
[357] | 1 | require File.dirname(__FILE__) + '/../../../../../../spec_helper'
|
---|
| 2 | require File.dirname(__FILE__) + '/shared_examples_spec'
|
---|
| 3 | include OpenEHR::RM::DataStructures::ItemStructure
|
---|
| 4 | include OpenEHR::RM::Composition::Content::Entry
|
---|
| 5 |
|
---|
| 6 | describe 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
|
---|
| 32 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.