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

Version Path
openehr-1.2.8 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.2.7 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.2.6 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.2.5 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.2.4 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.2.3 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.2.2 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.2.1 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.2.0 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.1.6 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.1.5 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.1.4 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.1.3 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.1.2 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.1.1 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
openehr-1.1.0 spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/rm/composition/content/entry/ism_transition_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/rm/composition/content/entry/ism_transition_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/rm/composition/content/entry/ism_transition_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/rm/composition/content/entry/ism_transition_spec.rb