source: ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/encapsulated/dv_encapsulated_spec.rb @ 236

Last change on this file since 236 was 236, checked in by KOBAYASHI, Shinji, 11 years ago

move from Test to Rspec

File size: 881 bytes
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEHR::RM::DataTypes::Encapsulated
3include OpenEHR::RM::DataTypes::Text
4
5describe DvEncapsulated do
6  before(:each) do
7    dummy = 'test'
8    charset = stub(CodePhrase, :code_string => 'UTF-8')
9    language = stub(CodePhrase, :code_string => 'ja')
10    @dv_encapsulated = DvEncapsulated.new(:value => dummy,
11                                          :charset => charset,
12                                          :language => language)
13  end
14
15  it 's value should be test' do
16    @dv_encapsulated.value.should == 'test'
17  end
18
19  it 's size should be 4' do
20    @dv_encapsulated.size.should be_equal 4
21  end
22
23  it 's charset should be utf-8' do
24    @dv_encapsulated.charset.code_string.should == 'UTF-8'
25  end
26
27  it 's langage should be ja' do
28    @dv_encapsulated.language.code_string.should == 'ja'
29  end
30end
Note: See TracBrowser for help on using the repository browser.