Index: ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/audit_details_spec.rb
===================================================================
--- ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/audit_details_spec.rb	(revision 312)
+++ ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/audit_details_spec.rb	(revision 322)
@@ -37,3 +37,15 @@
     @audit_details.description.value.should == 'test environment'
   end
+
+  it 'should raise ArgumentError when system_id was assigned nil' do
+    lambda {
+      @audit_details.system_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when time_commited is nil' do
+    lambda {
+      @audit_details.time_committed = nil
+    }.should raise_error ArgumentError
+  end
 end
Index: ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/party_identified_spec.rb
===================================================================
--- ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/party_identified_spec.rb	(revision 312)
+++ ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/party_identified_spec.rb	(revision 322)
@@ -26,3 +26,39 @@
     @party_identified.identifier.size.should be_equal 5
   end
+
+  it 'should raise ArgumentError with all nil' do
+    lambda {
+      PartyIdentified.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil name when ex_r and id nil' do
+    @party_identified.identifier = nil
+    @party_identified.external_ref = nil
+    lambda {
+      @party_identified.name = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil external_ref when name and id nil' do
+    @party_identified.name = nil
+    @party_identified.identifier = nil
+    lambda {
+      @party_identified.external_ref = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil identifier when name and ex_r nil' do
+    @party_identified.name = nil
+    @party_identified.external_ref = nil
+    lambda {
+      @party_identified.identifier = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty identifier' do
+    lambda {
+      @party_identified.identifier = Array.new
+    }.should raise_error ArgumentError
+  end
 end
Index: ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/party_related_spec.rb
===================================================================
--- ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/party_related_spec.rb	(revision 312)
+++ ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/party_related_spec.rb	(revision 322)
@@ -1,5 +1,5 @@
 require File.dirname(__FILE__) + '/../../../../../spec_helper'
 include OpenEHR::RM::Common::Generic
-
+include OpenEHR::RM::DataTypes::Text
 describe PartyRelated do
   before(:each) do
Index: ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_time_spec.rb
===================================================================
--- ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_time_spec.rb	(revision 322)
+++ ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_time_spec.rb	(revision 322)
@@ -0,0 +1,16 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe DvDateTime do
+  before(:each) do
+    @dv_date_time = DvDateTime.new(:value => '2009-09-29T15:03:22.3')
+  end
+
+  it 'should be an instance of DvDateTime' do
+    @dv_date_time.should be_an_instance_of DvDateTime
+  end
+
+  it 'magnitude should be 63425495002.3' do
+    @dv_date_time.magnitude.should be_close 63423697018.3, 0.001
+  end
+end
Index: ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_time_spec.rb
===================================================================
--- ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_time_spec.rb	(revision 322)
+++ ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_time_spec.rb	(revision 322)
@@ -0,0 +1,37 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe DvTime do
+  before(:each) do
+    @dv_time = DvTime.new(:value => '11:17:30.2')
+  end
+
+  it 'should be an instance of DvTime' do
+    @dv_time.should be_an_instance_of DvTime
+  end
+
+  it 'hour should be 11' do
+    @dv_time.hour.should == 11
+  end
+
+  it 'minute should be 17' do
+    @dv_time.minute.should == 17
+  end
+
+  it 'second should be 30' do
+    @dv_time.second.should == 30
+  end
+
+  it 'fractional_second should be 0.2' do
+    @dv_time.fractional_second.should == 0.2
+  end
+
+  it 'magnitude should 40650.2' do
+    @dv_time.magnitude.should == 40650.2
+  end
+
+  it 'should be ' do
+    diff_time = DvTime.new(:value => '15:36:48.05')
+    @dv_time.diff(diff_time).value.should =='P0Y0M0W0DT4H19M17.85S'
+  end
+end
