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