diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-23 12:45:53 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-23 12:45:53 +0000 |
commit | a8b6a6f331d0f6186a970f9a6fa7f3ff9dee395a (patch) | |
tree | 6f389c78bcbab3930c0358baa9318ec5d492aa70 /test/rexml/test_contrib.rb | |
parent | a4610baeee3b2cb089dede25162eb2976e779074 (diff) |
merges r30284 from trunk into ruby_1_9_2.
--
* test/rexml/test_contrib.rb (ContribTester#test_pos): should not
use fixed path name for tests. [ruby-dev:42827]
* test/rexml/test_sax.rb (SAX2Tester#test_socket): should not use
fixed port for tests. [ruby-dev:42828]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rexml/test_contrib.rb')
-rw-r--r-- | test/rexml/test_contrib.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/rexml/test_contrib.rb b/test/rexml/test_contrib.rb index 785169bdd0..bf559ddc9f 100644 --- a/test/rexml/test_contrib.rb +++ b/test/rexml/test_contrib.rb @@ -74,7 +74,7 @@ DELIMITER EOF doc = REXML::Document.new source doc.write(out="") - assert(out[/>'>/] != nil, "Couldn't find >'>") + assert(out[/>\'>/] != nil, "Couldn't find >'>") assert(out[/\]>/] != nil, "Couldn't find ]>") end @@ -512,7 +512,8 @@ EOL end def test_pos - testfile = "/tmp/tidal#{$$}" + require 'tempfile' + testfile = Tempfile.new("tidal") testdata = %Q{<calibration> <section name="parameters"> <param name="barpress">760</param> @@ -521,13 +522,12 @@ EOL </calibration> } - File.open(testfile, 'w') do |f| - f.puts testdata + testfile.puts testdata + testfile.rewind + assert_nothing_raised do + d = REXML::Document.new(testfile) end - File.open(testfile) do |f| - d = REXML::Document.new(f) - end - #File.unlink(testfile) + testfile.close(true) end def test_deep_clone |