Last change
on this file since 317 was 317, checked in by Tatsukawa, Akimichi, 15 years ago |
created remote_adl_test.rb
|
File size:
993 bytes
|
Line | |
---|
1 | require File.dirname(__FILE__) + '/test_helper.rb'
|
---|
2 |
|
---|
3 | class RemoteADLTest < Test::Unit::TestCase
|
---|
4 | #http://www.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/
|
---|
5 | def setup
|
---|
6 | @adls = []
|
---|
7 | doc = Hpricot( open("http://www.openehr.org/svn/knowledge/archetypes/dev/adl/test/").read )
|
---|
8 | dirs = ["cluster/", "composition/", "element/", "entry/", "section/", "structure/"]
|
---|
9 | dirs.each do |dir|
|
---|
10 | doc = Hpricot( open("http://www.openehr.org/svn/knowledge/archetypes/dev/adl/openehr/ehr/#{dir}").read )
|
---|
11 | (doc/:a).each do |link|
|
---|
12 | if link[:href] =~ /.*\.adl\Z/
|
---|
13 | @adls << "http://www.openehr.org/svn/knowledge/archetypes/dev/adl/openehr/ehr/#{dir}#{$~}"
|
---|
14 | end
|
---|
15 | end
|
---|
16 | end
|
---|
17 | @parser = ::OpenEhr::ADL::Parser.new
|
---|
18 | end
|
---|
19 |
|
---|
20 | must "adls should properly parsed" do
|
---|
21 | assert_nothing_raised do
|
---|
22 | @adls.each do |adl|
|
---|
23 | puts "Processing #{adl}"
|
---|
24 | open(adl) do |file|
|
---|
25 | @parser.parse(file.read, adl)
|
---|
26 | end
|
---|
27 | end
|
---|
28 | end
|
---|
29 | end
|
---|
30 |
|
---|
31 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.