Rev | Line | |
---|
[247] | 1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
| 2 | include OpenEHR::RM::DataTypes::Quantity
|
---|
| 3 |
|
---|
| 4 | describe DvQuantified do
|
---|
| 5 | before(:all) do
|
---|
| 6 | @dv_quantified = DvQuantified.new(:magnitude => 1,
|
---|
| 7 | :magnitude_status => '=')
|
---|
| 8 | end
|
---|
| 9 |
|
---|
| 10 | it 'should be an instance of DvQuantified' do
|
---|
| 11 | @dv_quantified.should be_an_instance_of DvQuantified
|
---|
| 12 | end
|
---|
| 13 |
|
---|
| 14 | it 's magnitude should be 1' do
|
---|
| 15 | @dv_quantified.magnitude.should be_equal 1
|
---|
| 16 | end
|
---|
| 17 |
|
---|
| 18 | it 's magnitude_status should be =' do
|
---|
| 19 | @dv_quantified.magnitude_status.should == '='
|
---|
| 20 | end
|
---|
| 21 |
|
---|
| 22 | it 's comparable to other DvQuantified' do
|
---|
| 23 | dv_quantified = DvQuantified.new(:magnitude => 2)
|
---|
| 24 | @dv_quantified.should < dv_quantified
|
---|
| 25 | end
|
---|
| 26 |
|
---|
| 27 | it 'should raise ArgumentError with invalid magnitude_status' do
|
---|
| 28 | lambda {
|
---|
| 29 | @dv_quantified.magnitude_status = '+'
|
---|
| 30 | }.should raise_error ArgumentError
|
---|
| 31 | end
|
---|
| 32 |
|
---|
| 33 | it 's accuracy should be unknown' do
|
---|
| 34 | @dv_quantified.should be_accuracy_unknown
|
---|
| 35 | end
|
---|
| 36 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.