Last change
on this file since 238 was 231, checked in by KOBAYASHI, Shinji, 15 years ago |
move from test to rspec
|
File size:
941 bytes
|
Line | |
---|
1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
2 | include OpenEHR::RM::DataTypes::Uri
|
---|
3 |
|
---|
4 | describe DvUri do
|
---|
5 | before(:each) do
|
---|
6 | @dv_uri = DvUri.new(:value =>
|
---|
7 | "http://www.openehr.jp/changeset/test?cmd=93#file0")
|
---|
8 | end
|
---|
9 |
|
---|
10 | it 's fragment_id should be file0' do
|
---|
11 | @dv_uri.fragment_id.should == 'file0'
|
---|
12 | end
|
---|
13 |
|
---|
14 | it 's path should be /changeset/test' do
|
---|
15 | @dv_uri.path.should == '/changeset/test'
|
---|
16 | end
|
---|
17 |
|
---|
18 | it 's query should be cmd=93' do
|
---|
19 | @dv_uri.query.should == 'cmd=93'
|
---|
20 | end
|
---|
21 |
|
---|
22 | it 's scheme should be http' do
|
---|
23 | @dv_uri.scheme.should == 'http'
|
---|
24 | end
|
---|
25 |
|
---|
26 | it 's value should be http://www.openehr.jp/changeset/test?cmd=93#file0' do
|
---|
27 | @dv_uri.value.should == 'http://www.openehr.jp/changeset/test?cmd=93#file0'
|
---|
28 | end
|
---|
29 |
|
---|
30 | it 's value change' do
|
---|
31 | lambda {
|
---|
32 | @dv_uri.value="svn://www.openehr.jp/openehr-jp/"
|
---|
33 | }.should change(@dv_uri, :value).to('svn://www.openehr.jp/openehr-jp/')
|
---|
34 | end
|
---|
35 | end
|
---|
36 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.