Changeset 239


Ignore:
Timestamp:
Aug 28, 2009, 1:58:10 AM (11 years ago)
Author:
KOBAYASHI, Shinji
Message:

add encapsulated spec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/encapsulated/dv_encapsulated_spec.rb

    r236 r239  
    2828    @dv_encapsulated.language.code_string.should == 'ja'
    2929  end
     30
     31  it 'should raise ArgumentError when language is invalid' do
     32    wrong_lang = stub(CodePhrase, :code_string => 'jj')
     33    lambda {@dv_encapsulated.language = wrong_lang}.
     34      should raise_error(ArgumentError)
     35  end
     36
     37  it 'should raise ArgumentError when charset is invalid' do
     38    wrong_charset = stub(CodePhrase, :code_string => 'UBK')
     39    lambda {@dv_encapsulated.charset = wrong_charset}.
     40      should raise_error(ArgumentError)
     41  end
    3042end
Note: See TracChangeset for help on using the changeset viewer.