Sha256: dcfa166e8dbccfb4ecaace4ab7333b467e5e37b83ee7e2bfba1c54d7287c3751

Contents?: true

Size: 731 Bytes

Versions: 26

Compression:

Stored size: 731 Bytes

Contents

require File.dirname(__FILE__) + '/../../../../../../spec_helper'
include OpenEHR::RM::DataStructures::ItemStructure::Representation
include OpenEHR::RM::DataTypes::Text

describe Cluster do
  before(:each) do
    item = stub(Item)
    @cluster = Cluster.new(:archetype_node_id => 'at0001',
                           :name => DvText.new(:value => 'cluster'),
                           :items => [item, item])
  end

  it 'should be an isntance of Cluster' do
    @cluster.should be_an_instance_of Cluster
  end

  it 'item size should be 2' do
    @cluster.items.size.should == 2
  end

  it 'should raise ArgumentError with empty items' do
    lambda {
      @cluster.items = []
    }.should raise_error ArgumentError
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
open_ehr-0.9.4 spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb
open_ehr-0.9.3 spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb
open_ehr-0.9.2 spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb
open_ehr-0.9.1 spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb
open_ehr-0.9.0 spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb
open_ehr-0.6.1 spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb