Rev | Line | |
---|
[390] | 1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
| 2 | include OpenEHR::AM::Archetype::Assertion
|
---|
| 3 |
|
---|
| 4 | describe AssertionVariable do
|
---|
| 5 | before(:each) do
|
---|
| 6 | @assertion_variable =
|
---|
| 7 | AssertionVariable.new(:name => 'test',
|
---|
| 8 | :definition => 'examine spec')
|
---|
| 9 | end
|
---|
| 10 |
|
---|
| 11 | it 'name should be assigned properly' do
|
---|
| 12 | @assertion_variable.name.should == 'test'
|
---|
| 13 | end
|
---|
| 14 |
|
---|
| 15 | it 'should raise ArgumentError when name is nil' do
|
---|
| 16 | lambda {
|
---|
| 17 | @assertion_variable.name = nil
|
---|
| 18 | }.should raise_error ArgumentError
|
---|
| 19 | end
|
---|
| 20 |
|
---|
| 21 | it 'definition should be assigned properly' do
|
---|
| 22 | @assertion_variable.definition.should == 'examine spec'
|
---|
| 23 | end
|
---|
| 24 |
|
---|
| 25 | it 'should raise ArgumentError if definiton is nil' do
|
---|
| 26 | lambda {
|
---|
| 27 | @assertion_variable.definition = nil
|
---|
| 28 | }.should raise_error ArgumentError
|
---|
| 29 | end
|
---|
| 30 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.