Sha256: c40e2989008d023729bc56f500bdb9477ecb1a75e6e696e793e9465063a46651

Contents?: true

Size: 941 Bytes

Versions: 26

Compression:

Stored size: 941 Bytes

Contents

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

describe DvParsable do
  before(:each) do
    @dv_parsable = DvParsable.new(:value => 'test',
                                  :formalism => 'plain/text')
  end

  it 'should be an instance of DvParsable' do
    @dv_parsable.should be_an_instance_of DvParsable
  end

  it 'value should be test' do
    @dv_parsable.value.should == 'test'
  end

  it 's size should be 4' do
    @dv_parsable.size.should be_equal 4
  end

  it 's formalism should be plain/text' do
    @dv_parsable.formalism.should == 'plain/text'
  end

  it 'should raise ArgumentError formalism nil' do
    lambda {@dv_parsable.formalism = nil}.should raise_error(ArgumentError)
  end

  it 'should raise ArgumentError formalism empty' do
    lambda {@dv_parsable.formalism = ''}.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_types/encapsulated/dv_parsable_spec.rb
openehr-1.2.7 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.2.6 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.2.5 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.2.4 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.2.3 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.2.2 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.2.1 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.2.0 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.1.6 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.1.5 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.1.4 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.1.3 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.1.2 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.1.1 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
openehr-1.1.0 spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/rm/data_types/encapsulated/dv_parsable_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/rm/data_types/encapsulated/dv_parsable_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/rm/data_types/encapsulated/dv_parsable_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/rm/data_types/encapsulated/dv_parsable_spec.rb