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
openehr-1.2.8 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.2.7 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.2.6 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.2.5 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.2.4 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.2.3 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.2.2 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.2.1 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.2.0 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.1.6 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.1.5 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.1.4 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.1.3 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.1.2 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.1.1 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
openehr-1.1.0 spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb