Sha256: fbae19099feedeb7795517a522166145d4bf532911ec1a2557b85730101ddceb
Contents?: true
Size: 1.28 KB
Versions: 26
Compression:
Stored size: 1.28 KB
Contents
require File.dirname(__FILE__) + '/../../../../spec_helper' include OpenEHR::RM::Demographic include OpenEHR::RM::DataTypes::Text include OpenEHR::RM::DataTypes::Quantity::DateTime include OpenEHR::RM::Support::Identification include OpenEHR::RM::DataStructures::ItemStructure describe Capability do before(:each) do name = DvText.new(:value => 'party relation') credentials = stub(ItemStructure, :archetype_node_id => 'at0001') lower = DvDate.new(:value => '2009-11-21') time_validity = stub(DvInterval, :lower => lower) @capability = Capability.new(:archetype_node_id => 'at0000', :name => name, :credentials => credentials, :time_validity => time_validity) end it 'should be an instance of Capability' do @capability.should be_an_instance_of Capability end it 'credential should be assigned properly' do @capability.credentials.archetype_node_id.should == 'at0001' end it 'should raise ArgumentError when nil assigned to credentials' do lambda { @capability.credentials = nil }.should raise_error ArgumentError end it 'time_validity should be assigned properly' do @capability.time_validity.lower.value.should == '2009-11-21' end end
Version data entries
26 entries across 26 versions & 2 rubygems