Sha256: c4bbe1e7f7c899320382b11b20876f2e4f06a7e41efab8cce75d5a846bd7a428
Contents?: true
Size: 1.59 KB
Versions: 26
Compression:
Stored size: 1.59 KB
Contents
require File.dirname(__FILE__) + '/../../../../../../spec_helper' include OpenEHR::RM::DataStructures::ItemStructure include OpenEHR::RM::Composition::Content::Entry include OpenEHR::RM::Support::Identification describe InstructionDetails do before(:each) do instruction_id = stub(LocatableRef, :path => '[instruction]/[test]') wf_details = stub(ItemStructure, :archetype_node_id => 'at0004') @instruction_details = InstructionDetails.new(:instruction_id => instruction_id, :activity_id => 'at0003', :wf_details => wf_details) end it 'should be an instance of InstructionDetails' do @instruction_details.should be_an_instance_of InstructionDetails end it 'instruction_id should be assigned properly' do @instruction_details.instruction_id.path.should == '[instruction]/[test]' end it 'should raise ArgumentError with nil instruction_id' do lambda { @instruction_details.instruction_id = nil }.should raise_error ArgumentError end it 'activity_id should be assigned properly' do @instruction_details.activity_id.should == 'at0003' end it 'should raise ArgumentError with nil activity_id' do lambda { @instruction_details.activity_id = nil }.should raise_error ArgumentError end it 'should raise ArgumentError with empty activity_id' do lambda { @instruction_details.activity_id = '' }.should raise_error ArgumentError end it 'wf_details should be assigned properly' do @instruction_details.wf_details.archetype_node_id.should == 'at0004' end end
Version data entries
26 entries across 26 versions & 2 rubygems