source: ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_tempral_spec.rb@ 310

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

date_time test/unit moving to rspec

File size: 625 bytes
Line 
1require File.dirname(__FILE__) + '/../../../../../../spec_helper'
2include OpenEHR::RM::DataTypes::Quantity::DateTime
3
4describe DvTemporal do
5 before(:each) do
6 @dv_temporal = DvTemporal.new(:value => '2009-09-28T23:36')
7 end
8
9 it 'should be an instance of DvTemporal' do
10 @dv_temporal.should be_an_instance_of DvTemporal
11 end
12
13 it 'should raise ArgumentError with nil value' do
14 lambda {
15 @dv_temporal.value = nil
16 }.should raise_error ArgumentError
17 end
18
19 it 'should raise ArgumentError with empty value' do
20 lambda {
21 @dv_temporal.value = ''
22 }.should raise_error ArgumentError
23 end
24end
Note: See TracBrowser for help on using the repository browser.