summaryrefslogtreecommitdiff
path: root/test/xmlrpc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /test/xmlrpc
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/xmlrpc')
-rw-r--r--test/xmlrpc/test_datetime.rb18
-rw-r--r--test/xmlrpc/test_features.rb2
-rw-r--r--test/xmlrpc/test_marshal.rb6
-rw-r--r--test/xmlrpc/test_parser.rb12
-rw-r--r--test/xmlrpc/test_webrick_server.rb8
-rw-r--r--test/xmlrpc/webrick_testing.rb6
6 files changed, 26 insertions, 26 deletions
diff --git a/test/xmlrpc/test_datetime.rb b/test/xmlrpc/test_datetime.rb
index 528e080..0a84904 100644
--- a/test/xmlrpc/test_datetime.rb
+++ b/test/xmlrpc/test_datetime.rb
@@ -67,10 +67,10 @@ class Test_DateTime < Test::Unit::TestCase
def test_set_exception
dt = createDateTime()
-
+
assert_raise(ArgumentError) { dt.year = 4.5 }
assert_nothing_raised(ArgumentError) { dt.year = -2000 }
-
+
assert_raise(ArgumentError) { dt.month = 0 }
assert_raise(ArgumentError) { dt.month = 13 }
assert_nothing_raised(ArgumentError) { dt.month = 7 }
@@ -99,7 +99,7 @@ class Test_DateTime < Test::Unit::TestCase
def test_to_a
y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5
dt = XMLRPC::DateTime.new(y, m, d, h, mi, s)
- a = dt.to_a
+ a = dt.to_a
assert_instance_of(Array, a)
assert_equal(6, a.size, "Returned array has wrong size")
@@ -115,8 +115,8 @@ class Test_DateTime < Test::Unit::TestCase
def test_to_time1
y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5
dt = XMLRPC::DateTime.new(y, m, d, h, mi, s)
- time = dt.to_time
-
+ time = dt.to_time
+
assert_not_nil(time)
assert_equal(y, time.year)
@@ -130,15 +130,15 @@ class Test_DateTime < Test::Unit::TestCase
def test_to_time2
dt = createDateTime()
dt.year = 1969
-
+
assert_nil(dt.to_time)
end
def test_to_date1
y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5
dt = XMLRPC::DateTime.new(y, m, d, h, mi, s)
- date = dt.to_date
-
+ date = dt.to_date
+
assert_equal(y, date.year)
assert_equal(m, date.month)
assert_equal(d, date.day)
@@ -147,7 +147,7 @@ class Test_DateTime < Test::Unit::TestCase
def test_to_date2
dt = createDateTime()
dt.year = 666
-
+
assert_equal(666, dt.to_date.year)
end
diff --git a/test/xmlrpc/test_features.rb b/test/xmlrpc/test_features.rb
index 377d539..0f86706 100644
--- a/test/xmlrpc/test_features.rb
+++ b/test/xmlrpc/test_features.rb
@@ -29,7 +29,7 @@ class Test_Features < Test::Unit::TestCase
XMLRPC::XMLWriter.each_installed_writer do |writer|
c = XMLRPC::Create.new(writer)
- str = c.methodCall("test", *@params)
+ str = c.methodCall("test", *@params)
XMLRPC::XMLParser.each_installed_parser do |parser|
para = nil
diff --git a/test/xmlrpc/test_marshal.rb b/test/xmlrpc/test_marshal.rb
index 38bc8c6..267b43e 100644
--- a/test/xmlrpc/test_marshal.rb
+++ b/test/xmlrpc/test_marshal.rb
@@ -42,7 +42,7 @@ class Test_Marshal < Test::Unit::TestCase
end
def test_parser_values
- v1 = [
+ v1 = [
1, -7778, # integers
1.0, 0.0, -333.0, 2343434343.0, # floats
false, true, true, false, # booleans
@@ -72,9 +72,9 @@ class Test_Marshal < Test::Unit::TestCase
assert_equal( v3_exp, m.load_response(m.dump_response(v3)) )
pers = m.load_response(m.dump_response(person))
-
+
assert( pers.is_a?(Person) )
- assert( person.name == pers.name )
+ assert( person.name == pers.name )
end
# missing, Date, Time, DateTime
diff --git a/test/xmlrpc/test_parser.rb b/test/xmlrpc/test_parser.rb
index 44ca1f8..1c50eae 100644
--- a/test/xmlrpc/test_parser.rb
+++ b/test/xmlrpc/test_parser.rb
@@ -7,16 +7,16 @@ module GenericParserTest
def datafile(base)
File.join(File.dirname(__FILE__), "data", base)
end
-
+
def load_data(name)
[File.read(datafile(name) + ".xml"), YAML.load(File.read(datafile(name) + ".expected"))]
end
def setup
@xml1, @expected1 = load_data('xml1')
- @xml2, @expected2 = load_data('bug_covert')
- @xml3, @expected3 = load_data('bug_bool')
- @xml4, @expected4 = load_data('value')
+ @xml2, @expected2 = load_data('bug_covert')
+ @xml3, @expected3 = load_data('bug_bool')
+ @xml4, @expected4 = load_data('value')
@cdata_xml, @cdata_expected = load_data('bug_cdata')
@@ -27,7 +27,7 @@ module GenericParserTest
end
# test parseMethodResponse --------------------------------------------------
-
+
def test_parseMethodResponse1
assert_equal(@expected1, @p.parseMethodResponse(@xml1))
end
@@ -67,7 +67,7 @@ module GenericParserTest
end
end
-# create test class for each installed parser
+# create test class for each installed parser
XMLRPC::XMLParser.each_installed_parser do |parser|
klass = parser.class
name = klass.to_s.split("::").last
diff --git a/test/xmlrpc/test_webrick_server.rb b/test/xmlrpc/test_webrick_server.rb
index 38cfe2f..47fa548 100644
--- a/test/xmlrpc/test_webrick_server.rb
+++ b/test/xmlrpc/test_webrick_server.rb
@@ -18,9 +18,9 @@ class Test_Webrick < Test::Unit::TestCase
if b == 0
raise XMLRPC::FaultException.new(1, "division by zero")
else
- a / b
+ a / b
end
- end
+ end
s.set_default_handler do |name, *args|
raise XMLRPC::FaultException.new(-99, "Method #{name} missing" +
@@ -34,13 +34,13 @@ class Test_Webrick < Test::Unit::TestCase
def setup_http_server(port, use_ssl)
option = {
- :Port => port,
+ :Port => port,
:SSLEnable => use_ssl,
}
if use_ssl
require 'webrick/https'
option.update(
- :SSLVerifyClient => ::OpenSSL::SSL::VERIFY_NONE,
+ :SSLVerifyClient => ::OpenSSL::SSL::VERIFY_NONE,
:SSLCertName => []
)
end
diff --git a/test/xmlrpc/webrick_testing.rb b/test/xmlrpc/webrick_testing.rb
index 2ca52ba..05c3340 100644
--- a/test/xmlrpc/webrick_testing.rb
+++ b/test/xmlrpc/webrick_testing.rb
@@ -5,19 +5,19 @@ module WEBrick_Testing
def initialize() super(self) end
def <<(*args) end
end
-
+
def start_server(config={})
raise "already started" if @__server
@__started = false
@__server_thread = Thread.new {
@__server = WEBrick::HTTPServer.new(
- {
+ {
:Logger => DummyLog.new,
:AccessLog => [],
:StartCallback => proc { @__started = true }
}.update(config))
- yield @__server
+ yield @__server
@__server.start
@__started = false
}