about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-05-13 17:48:56 -0700
committerEric Wong <normalperson@yhbt.net>2011-05-13 17:48:56 -0700
commitc8bd876fb5086e5b79299869b4c29f1f7f020b4d (patch)
tree10b61224b90047b9c1c9b0252aacba32505e3ec2 /test
parent6cefcff5889cceaa001f76f4be1a1c5e513b241d (diff)
downloadkgio-c8bd876fb5086e5b79299869b4c29f1f7f020b4d.tar.gz
This also allows us to return/override #to_path and #path if
necessary, but so far everything works with MRI 1.8, MRI 1.9,
and Rubinius.
Diffstat (limited to 'test')
-rw-r--r--test/test_tryopen.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_tryopen.rb b/test/test_tryopen.rb
index c885ca0..ca80460 100644
--- a/test/test_tryopen.rb
+++ b/test/test_tryopen.rb
@@ -7,8 +7,10 @@ class TestTryopen < Test::Unit::TestCase
 
   def test_tryopen_success
     tmp = Kgio.tryopen(__FILE__)
-    assert_instance_of File, tmp
+    assert_kind_of File, tmp
     assert_equal File.read(__FILE__), tmp.read
+    assert_equal __FILE__, tmp.path
+    assert_equal __FILE__, tmp.to_path
     assert_nothing_raised { tmp.close }
   end