Sha256: 77cb5830c0033c3e8c11565d287e5005041554a2aba2153316621a3bcad2b365
Contents?: true
Size: 1.48 KB
Versions: 26
Compression:
Stored size: 1.48 KB
Contents
require File.dirname(__FILE__) + '/../../../../../../spec_helper' include OpenEHR::RM::Composition::Content::Entry include OpenEHR::RM::DataTypes::Text describe IsmTransition do before(:each) do current_state = stub(DvCodedText, :value => 'planned') transition = stub(DvCodedText, :value => 'scheduled') careflow_step = stub(DvCodedText, :value => 'completed') @ism_transition = IsmTransition.new(:current_state => current_state, :transition => transition, :careflow_step => careflow_step) end it 'should be an instance of IsmTransition' do @ism_transition.should be_an_instance_of IsmTransition end it 'current_status should be assigned properly' do @ism_transition.current_state.value.should == 'planned' end it 'should raise ArgumentError with nil current state' do lambda { @ism_transition.current_state = nil }.should raise_error ArgumentError end it 'should raise ArgumentError when current_state has invalid code' it 'transition should be assined properly' do @ism_transition.transition.value.should == 'scheduled' end it 'should raise ArgumentError with nil transition' do lambda { @ism_transition.transition = nil }.should raise_error ArgumentError end it 'should raise ArugmentError with invalid transition code' it 'careflow_step should be assigned properly' do @ism_transition.careflow_step.value.should == 'completed' end end
Version data entries
26 entries across 26 versions & 2 rubygems