require File.dirname(__FILE__) + '/../../../../../spec_helper' include OpenEHR::RM::DataTypes::Text include OpenEHR::RM::Support::Identification describe DvText do before(:each) do @dv_text = DvText.new(:value => 'test') end it 'should be an instance of DvText' do @dv_text.should be_an_instance_of DvText end it 's value should be test' do @dv_text.value.should == 'test' end it 'should raise ArgumentError, when value include \n' do lambda { @dv_text.value = "not valid value\n" }.should raise_error(ArgumentError) end it 'should raise ArgumentError, when value is nil' do lambda { @dv_text.value = nil }.should raise_error(ArgumentError) end it 'formatting should be font' do @dv_text.formatting = 'font = 12pt' @dv_text.formatting.should == 'font = 12pt' end it 'should raise ArgumentError, when formatting is empty' do lambda{@dv_text.formatting = ""}.should raise_error(ArgumentError) end it 'should be mapping list' it 'should be hyperlink' it 'should be language' it 'should be encoding' end