aboutsummaryrefslogtreecommitdiffstats
path: root/test/csv/test_serialization.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-25 06:58:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-25 06:58:58 +0000
commitd05217109fb5e909bbd7849bcc799b6404c7c8b0 (patch)
tree59c6e741e5c94660ea5860d745fffec33274121b /test/csv/test_serialization.rb
parent47a1cd1291f1f52cc8d36cb533e0d653d128930a (diff)
downloadruby-d05217109fb5e909bbd7849bcc799b6404c7c8b0.tar.gz
* lib/csv.rb, test/csv: should not assume $, invariant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/csv/test_serialization.rb')
-rwxr-xr-x[-rw-r--r--]test/csv/test_serialization.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/csv/test_serialization.rb b/test/csv/test_serialization.rb
index 5f0201ed90..989a7e98b5 100644..100755
--- a/test/csv/test_serialization.rb
+++ b/test/csv/test_serialization.rb
@@ -7,9 +7,7 @@
# Copyright 2005 James Edward Gray II. You can redistribute or modify this code
# under the terms of Ruby's license.
-require "test/unit"
-
-require "csv"
+require_relative "base"
# An example of how to provide custom CSV serialization.
class Hash
@@ -26,7 +24,7 @@ class Hash
end
end
-class TestSerialization < Test::Unit::TestCase
+class TestCSV::Serialization < TestCSV
### Classes Used to Test Serialization ###
@@ -71,7 +69,7 @@ class TestSerialization < Test::Unit::TestCase
@data = CSV.dump(@names)
end
assert_equal(<<-END_CLASS_DUMP.gsub(/^\s*/, ""), @data)
- class,TestSerialization::ReadOnlyName
+ class,TestCSV::Serialization::ReadOnlyName
@first,@last
James,Gray
Dana,Gray
@@ -90,7 +88,7 @@ class TestSerialization < Test::Unit::TestCase
@data = CSV.dump(@names)
end
assert_equal(<<-END_STRUCT_DUMP.gsub(/^\s*/, ""), @data)
- class,TestSerialization::Name
+ class,TestCSV::Serialization::Name
first=,last=
James,Gray
Dana,Gray
@@ -109,7 +107,7 @@ class TestSerialization < Test::Unit::TestCase
@data = CSV.dump(@names)
end
assert_equal(<<-END_STRUCT_DUMP.gsub(/^\s*/, ""), @data)
- class,TestSerialization::FullName
+ class,TestCSV::Serialization::FullName
@suffix,first=,last=
II,James,Gray
,Dana,Gray
@@ -137,7 +135,7 @@ class TestSerialization < Test::Unit::TestCase
assert(File.exist?(data_file))
assert_equal(<<-END_IO_DUMP.gsub(/^\s*/, ""), File.read(data_file))
- class,TestSerialization::ReadOnlyName
+ class,TestCSV::Serialization::ReadOnlyName
@first,@last
James,Gray
Dana,Gray
@@ -153,4 +151,6 @@ class TestSerialization < Test::Unit::TestCase
obj = {1 => "simple", test: Hash}
assert_equal(obj, CSV.load(CSV.dump([obj])).first)
end
+
+ with_diffrent_ofs
end