summaryrefslogtreecommitdiff
path: root/test/xsd/test_xmlschemaparser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/xsd/test_xmlschemaparser.rb')
-rw-r--r--test/xsd/test_xmlschemaparser.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/xsd/test_xmlschemaparser.rb b/test/xsd/test_xmlschemaparser.rb
index b362120540..ab9421c954 100644
--- a/test/xsd/test_xmlschemaparser.rb
+++ b/test/xsd/test_xmlschemaparser.rb
@@ -6,16 +6,17 @@ module XSD
class TestXMLSchemaParser < Test::Unit::TestCase
- def self.setup(filename)
- @@filename = filename
+ def setup
+ @file = File.join(File.dirname(__FILE__), 'xmlschema.xml')
end
def test_wsdl
- @wsdl = WSDL::XMLSchema::Parser.new.parse(File.open(@@filename).read)
+ @wsdl = WSDL::XMLSchema::Parser.new.parse(File.open(@file) { |f| f.read })
+ assert_equal(WSDL::XMLSchema::Schema, @wsdl.class)
+ assert_equal(1, @wsdl.collect_elements.size)
end
end
-TestXMLSchemaParser.setup(File.join(File.dirname(__FILE__), 'xmlschema.xml'))
end