Rev | Line | |
---|
[221] | 1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
| 2 | include OpenEHR::RM::DataTypes::Text
|
---|
| 3 | include OpenEHR::RM::Support::Identification
|
---|
| 4 |
|
---|
| 5 | describe 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'
|
---|
| 46 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.