source: ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/text/dv_text_spec.rb@ 221

Last change on this file since 221 was 221, checked in by KOBAYASHI, Shinji, 15 years ago

CodePhrase modified

File size: 1.1 KB
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEHR::RM::DataTypes::Text
3include OpenEHR::RM::Support::Identification
4
5describe DvText do
6 before(:each) do
7 @dv_text = DvText.new(:value => 'test')
8 end
9
10 it 'should be an instance of DvText' do
11 @dv_text.should be_an_instance_of DvText
12 end
13
14 it 's value should be test' do
15 @dv_text.value.should == 'test'
16 end
17
18 it 'should raise ArgumentError, when value include \n' do
19 lambda {
20 @dv_text.value = "not valid value\n"
21 }.should raise_error(ArgumentError)
22 end
23
24 it 'should raise ArgumentError, when value is nil' do
25 lambda {
26 @dv_text.value = nil
27 }.should raise_error(ArgumentError)
28 end
29
30 it 'formatting should be font' do
31 @dv_text.formatting = 'font = 12pt'
32 @dv_text.formatting.should == 'font = 12pt'
33 end
34
35 it 'should raise ArgumentError, when formatting is empty' do
36 lambda{@dv_text.formatting = ""}.should raise_error(ArgumentError)
37 end
38
39 it 'should be mapping list'
40
41 it 'should be hyperlink'
42
43 it 'should be language'
44
45 it 'should be encoding'
46end
Note: See TracBrowser for help on using the repository browser.