ruby/test/wsdl/ref/test_ref.rb
(no author) caf6ad3a76 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-15 14:47:07 +00:00

42 lines
814 B
Ruby

require 'test/unit'
require 'soap/rpc/standaloneServer'
require 'soap/wsdlDriver'
require 'wsdl/soap/wsdl2ruby'
module WSDL
module Ref
class TestRef < Test::Unit::TestCase
DIR = File.dirname(File.expand_path(__FILE__))
Port = 17171
def test_classdef
gen = WSDL::SOAP::WSDL2Ruby.new
gen.location = pathname("product.wsdl")
gen.basedir = DIR
gen.logger.level = Logger::FATAL
gen.opt['classdef'] = nil
gen.opt['force'] = true
gen.run
compare("expectedProduct.rb", "product.rb")
File.unlink(pathname('product.rb'))
end
def compare(expected, actual)
assert_equal(loadfile(expected), loadfile(actual), actual)
end
def loadfile(file)
File.open(pathname(file)) { |f| f.read }
end
def pathname(filename)
File.join(DIR, filename)
end
end
end
end